test(tests): updated tests to use fractional checks
tests for eos and approx8 now use relative error to account for large dynamic range
This commit is contained in:
@@ -123,6 +123,8 @@ TEST_F(eosTest, eos_using_composition) {
|
||||
serif::eos::EOSOutput eosOutput;
|
||||
EXPECT_NO_THROW(eosOutput = EOS.get(eosInput));
|
||||
eosOutput = EOS.get(eosInput);
|
||||
constexpr double absErr = 1e-8;
|
||||
EXPECT_NEAR(eosOutput.pressure.total, 6.9548533046915791E+22, absErr);
|
||||
|
||||
const double pressureFraction = eosOutput.pressure.total / 6.9548533046915791E+22;
|
||||
constexpr double relError = 1e-6;
|
||||
EXPECT_NEAR(pressureFraction, 1.0, relError);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user