Skip to content

Commit

Permalink
get branck in test
Browse files Browse the repository at this point in the history
  • Loading branch information
DANA-Laboratory committed Jan 9, 2017
1 parent b4e51ce commit c8ad7bb
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
9 changes: 9 additions & 0 deletions test/runtests.jl
Expand Up @@ -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();
Expand Down
6 changes: 4 additions & 2 deletions test/testThrows.jl
Expand Up @@ -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)
Expand Down

0 comments on commit c8ad7bb

Please sign in to comment.