From c8ad7bbd11c37f3d0027e7abf57769a826a0c9b9 Mon Sep 17 00:00:00 2001 From: reza afzalan Date: Mon, 9 Jan 2017 08:41:53 +0330 Subject: [PATCH] get branck in test --- test/runtests.jl | 9 +++++++++ test/testThrows.jl | 6 ++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index a654781..f6ed62c 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -2,6 +2,15 @@ using CoolProp using Compat using Base.Test +const branchname = begin + if (isdefined(:LibGit2)) + LibGit2.branch(LibGit2.GitRepo(abspath(@__FILE__, "..", ".."))); + else + Base.Git.branch(dir = abspath(@__FILE__, "..", "..")); + end +end +info("On $branchname"); + include("testThrows.jl"); dl = CoolProp.get_debug_level(); diff --git a/test/testThrows.jl b/test/testThrows.jl index a34beb5..8aab56c 100644 --- a/test/testThrows.jl +++ b/test/testThrows.jl @@ -48,8 +48,10 @@ AbstractState_free(handle) handle = AbstractState_factory("SRK", "Ethanol"); @test_throws ErrorException AbstractState_set_fluid_parameter_double(inhandle, 1, "c", 0.0) @test_throws ErrorException AbstractState_set_fluid_parameter_double(handle, 0, instr, 0.0) -@test_throws ErrorException AbstractState_set_cubic_alpha_C(inhandle, 0, "TWU", 0.0, 0.0, 0.0) -@test_throws ErrorException AbstractState_set_cubic_alpha_C(handle, 0, instr, 0.0, 0.0, 0.0) +if (branchname == "nightly") + @test_throws ErrorException AbstractState_set_cubic_alpha_C(inhandle, 0, "TWU", 0.0, 0.0, 0.0) + @test_throws ErrorException AbstractState_set_cubic_alpha_C(handle, 0, instr, 0.0, 0.0, 0.0) +end if (haskey(ENV, "testCoolProp") && ENV["testCoolProp"]=="on") @test_throws ErrorException saturation_ancillary(instr,"I", 1, "T", 300.0) @test_throws ErrorException saturation_ancillary("R410A", instr, 1, "T", 300.0)