Fix tests: actually check for keyword in deck.

This commit is contained in:
Atgeirr Flø Rasmussen
2017-02-13 11:16:32 +01:00
parent 8527e646a1
commit 8936d9ab38

View File

@@ -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 ) {