Skip to content

Commit 0bcc134

Browse files
committed
Add more unittests
1 parent ef77887 commit 0bcc134

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/unittests.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -580,8 +580,10 @@ end
580580

581581
# Test conversion
582582
@test typeof(SymbolicDimensions{Rational{Int}}(dimension(us"km/s"))) == SymbolicDimensions{Rational{Int}}
583-
@test convert(Quantity{Float64,SymbolicDimensions}, u"kg") == us"1kg"
584-
@test convert(Quantity{Float64,Dimensions}, us"3.5kg/s") == u"3.5kg/s"
583+
@test convert(Quantity{Float64,SymbolicDimensions}, u"kg") == 1.0us"kg"
584+
@test convert(Quantity{Float64,SymbolicDimensions}, u"cm") == 1e-2us"m"
585+
@test convert(Quantity{Float64,Dimensions}, 3.5us"kg/s") == 3.5u"kg/s"
586+
@test convert(Quantity{Float64,Dimensions}, 3.5us"Constants.pc") == 3.5u"Constants.pc"
585587

586588
# Helpful error if symbol not found:
587589
sym5 = dimension(us"km/s")

0 commit comments

Comments
 (0)