Skip to content

Commit

Permalink
Add tests for modf
Browse files Browse the repository at this point in the history
Co-authored-by: Sebastian Stock <42280794+sostock@users.noreply.github.com>
  • Loading branch information
rashidrafeek and sostock authored May 19, 2022
1 parent 4141b2b commit 488cfc9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -631,6 +631,8 @@ end
@test mod2pi(360°) === 0° # 2pi is 360°
@test mod2pi(0.5pi*u"m/dm") pi # just testing the dimensionless fallback
@test modf(2.5rad) === (0.5, 2.0)
@test modf(-250cm/m) === (-1//2, -2//1)
@test_throws MethodError modf(1m)
@test @inferred(inv(s)) === s^-1
@test inv(ContextUnits(m,km)) === ContextUnits(m^-1,km^-1)
@test inv(FixedUnits(m)) === FixedUnits(m^-1)
Expand Down

0 comments on commit 488cfc9

Please sign in to comment.