InputErrorAction: convert to enum class

This commit is contained in:
Arne Morten Kvarving
2023-01-11 13:18:25 +01:00
parent e1c0409f42
commit edf937e2e5
27 changed files with 310 additions and 271 deletions

View File

@@ -44,10 +44,10 @@ BOOST_AUTO_TEST_CASE(ParserKeyword_includeInvalid) {
Opm::ParseContext parseContext;
Opm::ErrorGuard errors;
parseContext.update(Opm::ParseContext::PARSE_MISSING_INCLUDE , Opm::InputError::THROW_EXCEPTION );
parseContext.update(Opm::ParseContext::PARSE_MISSING_INCLUDE , Opm::InputErrorAction::THROW_EXCEPTION );
BOOST_CHECK_THROW(parser.parseFile(inputFilePath.string() , parseContext, errors) , Opm::OpmInputError);
parseContext.update(Opm::ParseContext::PARSE_MISSING_INCLUDE , Opm::InputError::IGNORE );
parseContext.update(Opm::ParseContext::PARSE_MISSING_INCLUDE , Opm::InputErrorAction::IGNORE );
BOOST_CHECK_NO_THROW(parser.parseFile(inputFilePath.string() , parseContext, errors));
}
@@ -122,7 +122,7 @@ BOOST_AUTO_TEST_CASE(ParserKeyword_includeWrongCase) {
// have to change the current behavior one not-so-fine day...
Opm::ParseContext parseContext;
Opm::ErrorGuard errors;
parseContext.update(Opm::ParseContext::PARSE_MISSING_INCLUDE , Opm::InputError::THROW_EXCEPTION );
parseContext.update(Opm::ParseContext::PARSE_MISSING_INCLUDE , Opm::InputErrorAction::THROW_EXCEPTION );
BOOST_CHECK_THROW(parser.parseFile(inputFile1Path.string(), parseContext, errors), Opm::OpmInputError);
BOOST_CHECK_THROW(parser.parseFile(inputFile2Path.string(), parseContext, errors), Opm::OpmInputError);