Skip to content

Commit af3c6a7

Browse files
committed
Update tests to user-passed version
1 parent 824f290 commit af3c6a7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/unittests.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -462,16 +462,16 @@ end
462462
@test utime(z) == 1
463463
@test ustrip(z) 60 * 60 * 24 * 365.25
464464

465-
# Test type stability of extreme range of units
466-
@test typeof(u"1") == DEFAULT_QUANTITY_TYPE
467-
@test typeof(u"1f0") == DEFAULT_QUANTITY_TYPE
465+
# Test that `u_str` respects original type:
466+
@test typeof(u"1") == Int
467+
@test typeof(u"1f0") == Float32
468468
@test typeof(u"s"^2) == DEFAULT_QUANTITY_TYPE
469469
@test typeof(u"") == DEFAULT_QUANTITY_TYPE
470470
@test typeof(u"Gyr") == DEFAULT_QUANTITY_TYPE
471471
@test typeof(u"fm") == DEFAULT_QUANTITY_TYPE
472472
@test typeof(u"fm"^2) == DEFAULT_QUANTITY_TYPE
473473

474-
@test_throws LoadError eval(:(u":x"))
474+
@test_throws ArgumentError eval(:(u":x"))
475475
end
476476

477477
@testset "Constants" begin

0 commit comments

Comments
 (0)