From 8936d9ab38d0cafcf1a01211a6d7b8bf38826f78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Atgeirr=20Fl=C3=B8=20Rasmussen?= Date: Mon, 13 Feb 2017 11:16:32 +0100 Subject: [PATCH] Fix tests: actually check for keyword in deck. --- opm/parser/eclipse/Parser/tests/ParserTests.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 ) {