Skip to content

Commit

Permalink
test fallback constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
Pietro Vertechi committed Dec 18, 2018
1 parent 8f22b25 commit 063e352
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ collect_structarray_rec(t) = collect_structarray(t, initializer = initializer)
v = [(a = 1, b = 2), (a = 1.2, b = 3)]
@test collect_structarray_rec(v) == StructArray((a = [1, 1.2], b = Int[2, 3]))
@test typeof(collect_structarray_rec(v)) == typeof(StructArray((a = Real[1, 1.2], b = Int[2, 3])))
@test StructArray(v[i] for i in eachindex(v)) == StructArray((a = [1, 1.2], b = Int[2, 3]))

s = StructArray(a = [1, 2], b = [3, 4])
@test collect_structarray(LazyRow(s, i) for i in eachindex(s)) == s
Expand Down

0 comments on commit 063e352

Please sign in to comment.