Use std::optional<> for tracer details

This commit is contained in:
Joakim Hove
2021-11-23 09:00:43 +01:00
parent f3f3dde251
commit 48854bfbeb
2 changed files with 10 additions and 10 deletions

View File

@@ -80,12 +80,12 @@ BOOST_AUTO_TEST_CASE(TracerConfigTest) {
auto it = tc.begin();
BOOST_CHECK_EQUAL(it->name, "SEA");
BOOST_CHECK_EQUAL(it->phase, Phase::WATER);
BOOST_CHECK(it->free_concentration.empty());
BOOST_CHECK_EQUAL(it->free_tvdp.numColumns(), 2U);
BOOST_CHECK(!it->free_concentration.has_value());
BOOST_CHECK_EQUAL(it->free_tvdp.value().numColumns(), 2U);
++it;
BOOST_CHECK_EQUAL(it->name, "OCE");
BOOST_CHECK_EQUAL(it->phase, Phase::GAS);
BOOST_CHECK_EQUAL(it->free_concentration.size(), 3U);
BOOST_CHECK_EQUAL(it->free_tvdp.numColumns(), 0U);
BOOST_CHECK_EQUAL(it->free_concentration.value().size(), 3U);
BOOST_CHECK(!it->free_tvdp.has_value());
}