Add overloads without ParseContext and ErrorGuard - update all tests
This commit is contained in:
@@ -28,7 +28,6 @@
|
||||
|
||||
|
||||
#include <opm/parser/eclipse/Parser/Parser.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
|
||||
|
||||
#include <opm/parser/eclipse/Deck/Section.hpp>
|
||||
#include <opm/parser/eclipse/Deck/Deck.hpp>
|
||||
@@ -55,7 +54,7 @@ static Opm::Deck createDeckInvalidArray() {
|
||||
"\n";
|
||||
|
||||
Opm::Parser parser;
|
||||
return parser.parseString(deckData, Opm::ParseContext()) ;
|
||||
return parser.parseString(deckData) ;
|
||||
}
|
||||
|
||||
|
||||
@@ -73,7 +72,7 @@ static Opm::Deck createDeckInvalidRegion() {
|
||||
"\n";
|
||||
|
||||
Opm::Parser parser;
|
||||
return parser.parseString(deckData, Opm::ParseContext()) ;
|
||||
return parser.parseString(deckData) ;
|
||||
}
|
||||
|
||||
|
||||
@@ -91,7 +90,7 @@ static Opm::Deck createDeckInvalidValue() {
|
||||
"\n";
|
||||
|
||||
Opm::Parser parser;
|
||||
return parser.parseString(deckData, Opm::ParseContext()) ;
|
||||
return parser.parseString(deckData) ;
|
||||
}
|
||||
|
||||
|
||||
@@ -110,7 +109,7 @@ static Opm::Deck createDeckUnInitialized() {
|
||||
"\n";
|
||||
|
||||
Opm::Parser parser;
|
||||
return parser.parseString(deckData, Opm::ParseContext()) ;
|
||||
return parser.parseString(deckData) ;
|
||||
}
|
||||
|
||||
|
||||
@@ -153,7 +152,7 @@ static Opm::Deck createValidIntDeck() {
|
||||
"\n";
|
||||
|
||||
Opm::Parser parser;
|
||||
return parser.parseString(deckData, Opm::ParseContext()) ;
|
||||
return parser.parseString(deckData) ;
|
||||
}
|
||||
|
||||
|
||||
@@ -203,7 +202,7 @@ static Opm::Deck createValidPERMXDeck() {
|
||||
"\n";
|
||||
|
||||
Opm::Parser parser;
|
||||
return parser.parseString(deckData, Opm::ParseContext()) ;
|
||||
return parser.parseString(deckData) ;
|
||||
}
|
||||
|
||||
|
||||
@@ -211,23 +210,23 @@ static Opm::Deck createValidPERMXDeck() {
|
||||
|
||||
BOOST_AUTO_TEST_CASE(InvalidArrayThrows) {
|
||||
Opm::Deck deck = createDeckInvalidArray();
|
||||
BOOST_CHECK_THROW( new Opm::EclipseState( deck, Opm::ParseContext()) , std::invalid_argument );
|
||||
BOOST_CHECK_THROW( new Opm::EclipseState( deck) , std::invalid_argument );
|
||||
}
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE(InvalidRegionThrows) {
|
||||
Opm::Deck deck = createDeckInvalidRegion();
|
||||
BOOST_CHECK_THROW( new Opm::EclipseState( deck, Opm::ParseContext()) , std::invalid_argument );
|
||||
BOOST_CHECK_THROW( new Opm::EclipseState( deck) , std::invalid_argument );
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(ExpectedIntThrows) {
|
||||
Opm::Deck deck = createDeckInvalidValue();
|
||||
BOOST_CHECK_THROW( new Opm::EclipseState( deck, Opm::ParseContext()) , std::invalid_argument );
|
||||
BOOST_CHECK_THROW( new Opm::EclipseState( deck) , std::invalid_argument );
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(UnInitializedVectorThrows) {
|
||||
Opm::Deck deck = createDeckUnInitialized();
|
||||
BOOST_CHECK_THROW( new Opm::EclipseState( deck, Opm::ParseContext()) , std::invalid_argument );
|
||||
BOOST_CHECK_THROW( new Opm::EclipseState( deck) , std::invalid_argument );
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(IntSetCorrectly) {
|
||||
|
||||
Reference in New Issue
Block a user