We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a1ba7e7 commit 92df2f4Copy full SHA for 92df2f4
test/unittests.jl
@@ -1860,7 +1860,12 @@ all_map_count_before_registering = length(ALL_MAPPING)
1860
@register_unit MySV us"V"
1861
@register_unit MySV2 us"km/h"
1862
1863
-@test_throws "Unit `m` is already defined as `1.0 m`" esc(_register_unit(:m, u"s"))
+if VERSION >= v"1.9"
1864
+ @test_throws "Unit `m` is already defined as `1.0 m`" esc(_register_unit(:m, u"s"))
1865
+
1866
+ # Constants as well:
1867
+ @test_throws "Unit `Ryd` is already defined" esc(_register_unit(:Ryd, u"Constants.Ryd"))
1868
+end
1869
1870
@testset "Register Unit" begin
1871
@test MyV === u"V"
0 commit comments