get rid of the 'strict parsing' concept
this is the 'Joakim-style' variant of the patch, i.e., an exception will always be thrown if an unknown keyword is encountered.
This commit is contained in:
@@ -101,33 +101,4 @@ BOOST_AUTO_TEST_CASE( KeywordInCorrectSection ) {
|
||||
// this fails because of the incorrect BOX keyword
|
||||
BOOST_CHECK(!Opm::checkDeck(deck, parserLog, Opm::SectionTopology | Opm::KeywordSection));
|
||||
}
|
||||
|
||||
{
|
||||
// deck contains an unknown keyword "FOO"
|
||||
const char *incorrectDeckString =
|
||||
"RUNSPEC\n"
|
||||
"FOO\n"
|
||||
"DIMENS\n"
|
||||
"3 3 3 /\n"
|
||||
"GRID\n"
|
||||
"DXV\n"
|
||||
"1 1 1 /\n"
|
||||
"DYV\n"
|
||||
"1 1 1 /\n"
|
||||
"DZV\n"
|
||||
"1 1 1 /\n"
|
||||
"TOPS\n"
|
||||
"9*100 /\n"
|
||||
"PROPS\n"
|
||||
"SOLUTION\n"
|
||||
"SCHEDULE\n";
|
||||
|
||||
auto deck = parser->parseString(incorrectDeckString, /*strict=*/false);
|
||||
Opm::ParserLogPtr parserLog(new Opm::ParserLog());
|
||||
BOOST_CHECK(!Opm::checkDeck(deck, parserLog));
|
||||
|
||||
// this is supposed to succeed as we ensure everything except that all keywords
|
||||
// are known
|
||||
BOOST_CHECK(Opm::checkDeck(deck, parserLog, ~Opm::UnknownKeywords));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user