We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
ustrip
1 parent 284586f commit 464141dCopy full SHA for 464141d
test/unittests.jl
@@ -2089,6 +2089,15 @@ end
2089
@test sprint(show, °C) == "°C"
2090
2091
@test sprint(show, °F) == "°F"
2092
+
2093
+ # Test the two-argument ustrip method with AffineUnit
2094
+ @test ustrip(ua"degC", 273.15u"K") ≈ 0.0
2095
+ @test ustrip(ua"degC", 300.15u"K") ≈ 27.0
2096
+ @test ustrip(ua"degF", 273.15u"K") ≈ 32.0
2097
+ @test ustrip(ua"degF", 300.15u"K") ≈ 80.6
2098
+ @test ustrip(ua"degC", 22ua"degC") ≈ 22.0
2099
+ @test ustrip(ua"degF", 22ua"degC") ≈ 71.6
2100
+ @test_throws DimensionError ustrip(ua"degC", 1.0u"m")
2101
end
2102
2103
@testset "Test div" begin
0 commit comments