Added test for IOConfigBaseName and fixed a self-introduced bug in E.S.
This commit is contained in:
@@ -166,13 +166,15 @@ namespace Opm {
|
||||
}
|
||||
|
||||
void EclipseState::initIOConfig(const Deck& deck) {
|
||||
m_ioConfig = std::make_shared<IOConfig>();
|
||||
std::string dataFile = deck.getDataFile();
|
||||
m_ioConfig = std::make_shared<IOConfig>(dataFile);
|
||||
|
||||
if (Section::hasGRID(deck)) {
|
||||
std::shared_ptr<const GRIDSection> gridSection = std::make_shared<const GRIDSection>(deck);
|
||||
auto gridSection = std::make_shared<const GRIDSection>(deck);
|
||||
m_ioConfig->handleGridSection(gridSection);
|
||||
}
|
||||
if (Section::hasRUNSPEC(deck)) {
|
||||
std::shared_ptr<const RUNSPECSection> runspecSection = std::make_shared<const RUNSPECSection>(deck);
|
||||
auto runspecSection = std::make_shared<const RUNSPECSection>(deck);
|
||||
m_ioConfig->handleRunspecSection(runspecSection);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -408,6 +408,13 @@ BOOST_AUTO_TEST_CASE(WithGridOptsDefaultRegion) {
|
||||
BOOST_CHECK_NE( &fluxnum , &multnum );
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(TestIOConfigBaseName) {
|
||||
ParseContext parseContext;
|
||||
ParserPtr parser(new Parser());
|
||||
DeckConstPtr deck = parser->parseFile("testdata/integration_tests/IOConfig/SPE1CASE2.DATA", parseContext);
|
||||
EclipseState state(*deck, parseContext);
|
||||
BOOST_CHECK_EQUAL(state.getIOConfig()->getBaseName(), "SPE1CASE2");
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(TestIOConfigCreation) {
|
||||
const char * deckData =
|
||||
|
||||
Reference in New Issue
Block a user