Skip to content

Commit

Permalink
added some tests for variable spec
Browse files Browse the repository at this point in the history
  • Loading branch information
longemen3000 committed Oct 26, 2020
1 parent e2343d4 commit 2242f5d
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -309,4 +309,19 @@ using ThermoState.StatePoints
end

@testset "variable spec" begin
λ = VariableSpec()
p0 = 1
t0 = 1
moles0 = 1
st0 = state(t=t0,p=p0,moles=moles0)
st1 = state(t=λ,p=p0,moles=moles0)
@test st1(t0) == st0
st1 = state(t=λ,p=λ,moles=moles0)
@test st1(t0,p0) == st0
st1 = state(t=λ,p=λ,moles=λ)
@test st1(t0,p0,moles0) == st0

sp0 = spec(t=t0)
sp1 = spec(t=λ)
@test sp1(t0) == sp0
end

0 comments on commit 2242f5d

Please sign in to comment.