Add small struct DeckKeyword::Location to simplify error reporting

This commit is contained in:
Joakim Hove
2019-10-17 15:25:13 +02:00
parent 007abc79f9
commit 2be6235ab7
5 changed files with 28 additions and 15 deletions

View File

@@ -34,6 +34,7 @@
#include <opm/parser/eclipse/EclipseState/Schedule/Action/Actions.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/Action/ActionX.hpp>
#include <opm/parser/eclipse/Deck/Deck.hpp>
#include <opm/parser/eclipse/Deck/DeckKeyword.hpp>
#include <opm/parser/eclipse/Parser/Parser.hpp>
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
#include <opm/parser/eclipse/Parser/ErrorGuard.hpp>
@@ -596,7 +597,7 @@ BOOST_AUTO_TEST_CASE(TestFieldAND) {
BOOST_AUTO_TEST_CASE(Conditions) {
auto location = std::make_pair<std::string, std::size_t>("FILE", 0);
auto location = DeckKeyword::Location("File", 100);
// Missing comparator
BOOST_CHECK_THROW(Action::Condition cond({"WWCT", "OPX"}, location), std::invalid_argument);