Skip to content

Commit d662f13

Browse files
authored
test fixes (#214)
1 parent 2bd33e3 commit d662f13

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/runtests.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ end
3838
@test _promote_typejoin(Pair{Int, Missing}, Pair{Int, Int}) == Pair{Int, Union{Int, Missing}}
3939
@test _promote_typejoin(NamedTuple{(:a, :b), Tuple{Int, Missing}}, NamedTuple{(:a, :b), Tuple{Int, Int}}) == NamedTuple{(:a, :b), Tuple{Int, Union{Int, Missing}}}
4040
@test _promote_typejoin(Tuple{}, Tuple{}) == Tuple{}
41-
@test _promote_typejoin(Tuple{Int}, Tuple{Int, Int}) == Tuple{Int, Vararg{Int, N} where N}
41+
@test _promote_typejoin(Tuple{Int}, Tuple{Int, Int}) == Tuple{Int, Vararg{Int}}
4242

4343
@test StructArrays.astuple(Tuple{Int}) == Tuple{Int}
4444
@test StructArrays.strip_params(Tuple{Int}) == Tuple
@@ -507,7 +507,8 @@ end
507507
@test v isa Array{Int, 1}
508508
end
509509

510-
const initializer = StructArrays.ArrayInitializer(t -> t <: Union{Tuple, NamedTuple, Pair})
510+
unwrap(t) = t <: Union{Tuple, NamedTuple, Pair}
511+
const initializer = StructArrays.ArrayInitializer(unwrap)
511512
collect_structarray_rec(t) = collect_structarray(t, initializer = initializer)
512513

513514
@testset "collectnamedtuples" begin

0 commit comments

Comments
 (0)