Skip to content

Commit

Permalink
Simplify tests for new sortexp() method (#638)
Browse files Browse the repository at this point in the history
  • Loading branch information
michikawa07 authored Apr 4, 2023
1 parent d0436bb commit 69ffe80
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1908,12 +1908,12 @@ end
end

@testset "Output ordered by unit exponent" begin
ordered = Unitful.sortexp(typeof(u"J*mol^-1*K^-1").parameters[1])
ordered = Unitful.sortexp(u"J*mol^-1*K^-1")
@test typeof(ordered[1]) <: Unitful.Unit{:Joule,<:Any}
@test typeof(ordered[2]) <: Unitful.Unit{:Kelvin,<:Any}
@test typeof(ordered[3]) <: Unitful.Unit{:Mole,<:Any}

ordered = Unitful.sortexp(typeof(u"mol*J^-1*K^-1").parameters[1])
ordered = Unitful.sortexp(u"mol*J^-1*K^-1")
@test typeof(ordered[1]) <: Unitful.Unit{:Mole,<:Any}
@test typeof(ordered[2]) <: Unitful.Unit{:Joule,<:Any}
@test typeof(ordered[3]) <: Unitful.Unit{:Kelvin,<:Any}
Expand Down

0 comments on commit 69ffe80

Please sign in to comment.