ActionResult will not access wells if overall false

This commit is contained in:
Joakim Hove
2020-05-05 19:18:39 +02:00
parent dc9ba1dc56
commit 3c879dd5dc
3 changed files with 16 additions and 29 deletions

View File

@@ -608,8 +608,9 @@ BOOST_AUTO_TEST_CASE(TestFieldAND) {
st.update("FMWPR", 1);
{
auto res = ast.eval(context);
auto wells = res.wells();
BOOST_CHECK(!res);
BOOST_CHECK_THROW(res.wells(), std::logic_error);
BOOST_CHECK_THROW(res.has_well("ABC"), std::logic_error);
}
st.update("FMWPR", 4);
@@ -783,19 +784,6 @@ TSTEP
BOOST_AUTO_TEST_CASE(ACTIONRESULT_COPY_EMPTY) {
Action::Result res1(false);
auto res2 = res1;
BOOST_CHECK(!res1);
BOOST_CHECK(!res2);
BOOST_CHECK(res1.wells() == std::vector<std::string>());
BOOST_CHECK(res2.wells() == std::vector<std::string>());
BOOST_CHECK(!res1.has_well("NO"));
BOOST_CHECK(!res2.has_well("NO"));
}
BOOST_AUTO_TEST_CASE(ACTIONRESULT_COPY_WELLS) {
Action::Result res1(true, {"W1", "W2", "W3"});
auto res2 = res1;