Fixed bug with 3 character long fluid names

Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
This commit is contained in:
Ian Bell
2015-01-28 19:34:04 -07:00
parent 575643938c
commit f5739e3354
2 changed files with 1 additions and 2 deletions

View File

@@ -379,7 +379,7 @@ void REFPROPMixtureBackend::set_REFPROP_fluids(const std::vector<std::string> &f
}
else
{
if (N == 1 && upper(components_joined_raw).find(".MIX") == components_joined_raw.size() - 4){
if (N == 1 && upper(components_joined_raw).find(".MIX") != std::string::npos){
// It's a predefined mixture
ierr = 0;
std::vector<double> x(ncmax);

View File

@@ -483,7 +483,6 @@ TEST_CASE("Check inputs to PropsSI","[PropsSI]")
SECTION("Single state, trivial output, pure incompressible"){
CHECK(ValidNumber(CoolProp::PropsSI("Tmin","P",0,"T",0,"INCOMP::DowQ")));
};
std::cout << get_global_param_string("errstring");
SECTION("Bad input pair"){
CHECK(!ValidNumber(CoolProp::PropsSI("D","Q",0,"Q",0,"Water")));
};