Added tests for P,Y inputs, though the solvers are not done yet

Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
This commit is contained in:
Ian Bell
2014-08-07 12:05:22 +02:00
parent 7f181360f7
commit 53c363990f
4 changed files with 171 additions and 30 deletions

View File

@@ -79,10 +79,6 @@ AbstractState * AbstractState::factory(const std::string &backend, const std::st
bool AbstractState::clear() {
// Reset all instances of CachedElement and overwrite
// the internal double values with -_HUGE
this->_fluid_type = FLUID_TYPE_UNDEFINED;
this->_phase = iphase_unknown;
this->_forceSinglePhase = false;
this->_forceTwoPhase = false;
this->_R = _HUGE;
/// Ancillary curve values
@@ -371,6 +367,10 @@ TEST_CASE("Check AbstractState","[AbstractState]")
{
CHECK_THROWS(shared_ptr<CoolProp::AbstractState> Water(CoolProp::AbstractState::factory("DEFINITELY_A_BAD_BACKEND", "Water")));
}
SECTION("good backend - helmholtz")
{
CHECK_THROWS(shared_ptr<CoolProp::AbstractState> Water(CoolProp::AbstractState::factory("HEOS", "Water")));
}
}
#endif