Skip to content

Commit

Permalink
[Test] Add test of unknown pure fluid
Browse files Browse the repository at this point in the history
Ensure that unknown pure-fluid-name values throw an error.
  • Loading branch information
bryanwweber committed Feb 12, 2020
1 parent 2d9e9f3 commit 451fa14
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/thermo/thermoFromYaml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,19 @@ TEST(ThermoFromYaml, PureFluid_CO2)
EXPECT_NEAR(thermo->density(), 513.27928388, 1e-6);
}

TEST(ThermoFromYaml, PureFluid_Unknown)
{
AnyMap root = AnyMap::fromYamlString(
"phases:\n"
"- name: unknown-purefluid\n"
" species: [N2]\n"
" thermo: pure-fluid\n"
" pure-fluid-name: unknown-purefluid\n"
);
AnyMap& phase = root["phases"].getMapWhere("name", "unknown-purefluid");
EXPECT_THROW(newPhase(phase, root), CanteraError);
}

TEST(ThermoFromYaml, ConstDensityThermo)
{
suppress_deprecation_warnings();
Expand Down

0 comments on commit 451fa14

Please sign in to comment.