Check pressure units in metric are not set to PSI

This commit is contained in:
Luke Butler
2023-03-16 16:21:55 -04:00
parent 4beebbd470
commit 6bc1efaf1c
2 changed files with 8 additions and 0 deletions

View File

@@ -183,6 +183,13 @@ BOOST_FIXTURE_TEST_CASE(test_pressure_units, FixtureInitClose)
BOOST_REQUIRE(error == 0);
BOOST_CHECK(abs(p - 298.76035) < 1.e-5);
// Set pressure to PSI and check that it remains in kPa
error = EN_setoption(ph, EN_PRESS_UNITS, EN_PSI);
BOOST_REQUIRE(error == 0);
error = EN_getoption(ph, EN_PRESS_UNITS, &units);
BOOST_REQUIRE(error == 0);
BOOST_CHECK(units == EN_KPA);
error = EN_closeH(ph);
BOOST_REQUIRE(error == 0);