From 2242f5d4d6d42587bcef7b48438ef74f332cf004 Mon Sep 17 00:00:00 2001 From: longemen3000 Date: Mon, 26 Oct 2020 17:53:41 -0300 Subject: [PATCH] added some tests for variable spec --- test/runtests.jl | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/test/runtests.jl b/test/runtests.jl index 683627c..d6f8139 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -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 \ No newline at end of file