diff --git a/opm/parser/eclipse/Parser/tests/ParserTests.cpp b/opm/parser/eclipse/Parser/tests/ParserTests.cpp index 06891c549..233745dc1 100644 --- a/opm/parser/eclipse/Parser/tests/ParserTests.cpp +++ b/opm/parser/eclipse/Parser/tests/ParserTests.cpp @@ -288,8 +288,8 @@ BOOST_AUTO_TEST_CASE( PATHS_has_global_scope ) { ParseContext parseContext; parseContext.update( ParseContext::PARSE_MISSING_INCLUDE , Opm::InputError::THROW_EXCEPTION); - parser.parseFile( "testdata/parser/PATHSInInclude.data", parseContext ); - BOOST_CHECK(parser.hasKeyword("OIL")); + const auto deck = parser.parseFile( "testdata/parser/PATHSInInclude.data", parseContext ); + BOOST_CHECK(deck.hasKeyword("OIL")); BOOST_CHECK_THROW( parser.parseFile( "testdata/parser/PATHSInIncludeInvalid.data", ParseContext() ), std::invalid_argument ); } @@ -298,8 +298,8 @@ BOOST_AUTO_TEST_CASE( PATHS_with_backslashes ) { ParseContext parseContext; parseContext.update( ParseContext::PARSE_MISSING_INCLUDE , Opm::InputError::THROW_EXCEPTION); - parser.parseFile( "testdata/parser/PATHSWithBackslashes.data", parseContext ); - BOOST_CHECK(parser.hasKeyword("OIL")); + const auto deck = parser.parseFile( "testdata/parser/PATHSWithBackslashes.data", parseContext ); + BOOST_CHECK(deck.hasKeyword("OIL")); } BOOST_AUTO_TEST_CASE( handle_empty_title ) {