diff --git a/test/runtests.jl b/test/runtests.jl index 825ea26..93942e0 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -19,6 +19,20 @@ const trivalwithnumval = ["FH","GWP100","PMIN","TMIN","P_REDUCING","PCRIT","GWP2 const fails_any_props_trivals = ["DIPOLE_MOMENT","FRACTION_MAX","FRACTION_MIN","RHOMASS_REDUCING","T_FREEZE"]; const fails_critical_point = ["R134a","R116","R236EA","R1234ze(E)","SulfurDioxide","n-Pentane","R11","CycloPropane","Cyclopentane","MDM","n-Nonane","Oxygen","DimethylCarbonate","R41","R227EA","R245fa","trans-2-Butene","MM","Air","R236FA","SES36","Fluorine","n-Undecane","Isohexane","IsoButane","R1234ze(Z)","HydrogenChloride"]; const fails_tcrit_eq_treducing = ["R134a","R116","R1234ze(E)","n-Pentane","R11","n-Nonane","MDM","Oxygen","R41","MM","Fluorine","n-Undecane","Isohexane","Helium","IsoButane","HydrogenChloride"]; + +function compare_sets(fails,reference) + failsset = Set(fails) + refset = Set(fails) + if issubset(failsset, refset) + return true + end + + diff = setdiff(failsset, refset) + println("The set of failures is not a subset of the reference set. Extra failures are: $diff") + + return false +end + #high @info "********* High Level Api *********" #get_global_param_string diff --git a/test/testFluids.jl b/test/testFluids.jl index c907ca0..a05efc9 100644 --- a/test/testFluids.jl +++ b/test/testFluids.jl @@ -30,7 +30,5 @@ for fluid in coolpropfluids end end println("max diff between reducing vs critical point T: $maxdiffreduvscriti for $maxfluid") -@test uneq == Set(fails_tcrit_eq_treducing) -println("different reducing vs critical point: $uneq") -@test issubset(critphasefail, Set(fails_critical_point)) -println("fails to get phase for critical point: $critphasefail") +@test compare_sets(uneq, Set(fails_tcrit_eq_treducing)) +@test compare_sets(critphasefail, Set(fails_critical_point))