Can parse one isolated WCONHIST keyword

This commit is contained in:
Joakim Hove
2013-08-01 10:05:13 +02:00
parent a8d4a22894
commit 3bd3c7a306
4 changed files with 25 additions and 3 deletions

View File

@@ -36,4 +36,23 @@ BOOST_AUTO_TEST_CASE( parse_WCHONHIST_OK ) {
ParserPtr parser(new Parser(JSON_CONFIG_FILE));
boost::filesystem::path wconhistFile("testdata/WCONHIST/WCONHIST1");
DeckPtr deck = parser->parse(wconhistFile.string());
DeckKeywordConstPtr kw1 = deck->getKeyword("WCONHIST");
BOOST_CHECK_EQUAL( 3U , kw1->size() );
DeckRecordConstPtr rec1 = kw1->getRecord(0);
BOOST_CHECK_EQUAL( 11U , rec1->size() );
DeckRecordConstPtr rec3 = kw1->getRecord(2);
BOOST_CHECK_EQUAL( 11U , rec3->size() );
DeckItemConstPtr item1 = rec1->getItem("WellName");
DeckItemConstPtr item1_index = rec1->getItem(0);
BOOST_CHECK_EQUAL( item1 , item1_index );
BOOST_CHECK_EQUAL( "OP_1" , item1->getString(0));
item1 = rec3->getItem("WellName");
BOOST_CHECK_EQUAL( "OP_3" , item1->getString(0));
}