Skip to content

Commit f2f9e5e

Browse files
authored
Fix zero tests on Julia master (#609)
Broken tests were fixed by JuliaLang/julia#48221
1 parent e2aa6f8 commit f2f9e5e

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

test/runtests.jl

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1429,17 +1429,24 @@ end
14291429
@test zero(Quantity[1m, 1s]) == [0m, 0s]
14301430
@test zero([1mm, missing]) == [0mm, 0mm]
14311431
@test zero(Union{typeof(0.0s),Missing}[missing]) == [0.0s]
1432-
@test_broken zero(Union{Quantity{Int,𝐋},Missing}[1mm, missing]) == [0mm, 0m]
1433-
@test_broken zero(Union{Quantity{Float64,𝐋},Missing}[1.0mm, missing]) == [0.0mm, 0.0m]
1432+
if VERSION v"1.10.0-DEV.425"
1433+
@test zero(Union{Quantity{Int,𝐋},Missing}[1mm, missing]) == [0m, 0m]
1434+
@test zero(Union{Quantity{Float64,𝐋},Missing}[1.0mm, missing]) == [0.0m, 0.0m]
1435+
@test zero(Union{Quantity{Int,𝚯},Missing}[1°C, 2°F, missing]) == [0K, 0K, 0K]
1436+
@test zero(Vector{Union{Quantity{Float64,𝐋},Missing}}(undef, 1)) == [0.0m]
1437+
else
1438+
@test_broken zero(Union{Quantity{Int,𝐋},Missing}[1mm, missing]) == [0m, 0m]
1439+
@test_broken zero(Union{Quantity{Float64,𝐋},Missing}[1.0mm, missing]) == [0.0m, 0.0m]
1440+
@test_broken zero(Union{Quantity{Int,𝚯},Missing}[1°C, 2°F, missing]) == [0K, 0K, 0K]
1441+
@test_broken zero(Vector{Union{Quantity{Float64,𝐋},Missing}}(undef, 1)) == [0.0m]
1442+
end
14341443
@test_broken zero(Union{Quantity,Missing}[1m, 1mm]) == [0m, 0mm]
14351444
@test zero([1°C, 2°C]) == [0K, 0K]
14361445
@test zero(Quantity[1°C, 2°F]) == [0K, 0K]
14371446
@test zero(Union{typeof(0°C),Missing}[missing]) == [0K]
1438-
@test_broken zero(Union{Quantity{Int,𝚯},Missing}[1°C, 2°F, missing]) == [0K, 0K, 0K]
14391447
@test zero(Vector{typeof(big(1)mm)}(undef, 1)) == [big(0)mm]
14401448
@test zero(Vector{Union{typeof(big(1)mm),Missing}}(undef, 1)) == [big(0)mm]
14411449
@test zero(Vector{Quantity{Float64,𝐋}}(undef, 1)) == [0.0m]
1442-
@test_broken zero(Vector{Union{Quantity{Float64,𝐋},Missing}}(undef, 1)) == [0.0m]
14431450
@test_throws MethodError zero(Union{Quantity,Missing}[1m, 1s, missing])
14441451
@test_throws MethodError zero(Vector{Quantity}(undef, 1))
14451452
@test_throws MethodError zero(Vector{Union{Quantity,Missing}}(undef, 1))

0 commit comments

Comments
 (0)