Skip to content

Commit

Permalink
Make test more robust for 32-bit
Browse files Browse the repository at this point in the history
  • Loading branch information
quinnj committed Jun 29, 2019
1 parent a26d31f commit 1995295
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/core.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5896,17 +5896,17 @@ struct UnionFieldInlineStruct
y::Union{Float64, Missing}
end

@test sizeof(Vector{UnionFieldInlineStruct}(undef, 2)) == 48
@test sizeof(Vector{UnionFieldInlineStruct}(undef, 2)) == sizeof(UnionFieldInlineStruct) * 2

let x = UnionFieldInlineStruct(1, 3.14)
AInlineUnion = [x for i = 1:10]
@test sizeof(AInlineUnion) == 240
@test sizeof(AInlineUnion) == sizeof(UnionFieldInlineStruct) * 10
BInlineUnion = Vector{UnionFieldInlineStruct}(undef, 10)
copyto!(BInlineUnion, AInlineUnion)
@test AInlineUnion == BInlineUnion
@test BInlineUnion[end] == x
CInlineUnion = vcat(AInlineUnion, BInlineUnion)
@test sizeof(CInlineUnion) == 480
@test sizeof(CInlineUnion) == sizeof(UnionFieldInlineStruct) * 20
@test CInlineUnion[end] == x
end

Expand Down

0 comments on commit 1995295

Please sign in to comment.