Moved testdata into integration test folder. Added build folder to gitignore
This commit is contained in:
parent
002ab45f77
commit
c7fa8a2e0a
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
*~
|
||||
gmon.out
|
||||
log.log
|
||||
build
|
||||
|
@ -151,19 +151,17 @@ BOOST_AUTO_TEST_CASE(Parse_InvalidInputFile_Throws) {
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(Parse_ValidInputFile_NoThrow) {
|
||||
boost::filesystem::path singleKeywordFile("testdata/small.data");
|
||||
boost::filesystem::path singleKeywordFile("testdata/integration_tests/small.data");
|
||||
ParserPtr parser(new Parser(JSON_CONFIG_FILE));
|
||||
|
||||
BOOST_CHECK_NO_THROW(parser->parse(singleKeywordFile.string()));
|
||||
}
|
||||
|
||||
/***************** Testing non-recognized keywords ********************/
|
||||
BOOST_AUTO_TEST_CASE(loadKeywordsJSON_manyKeywords_returnstrue) {
|
||||
ParserPtr parser(new Parser());
|
||||
Json::JsonObject jsonConfig( "[{\"name\" : \"BPR\" , \"size\" : 100}, {\"name\" : \"WWCT\"} , {\"name\" : \"EQUIL\" , \"size\" : 100}]");
|
||||
|
||||
parser->loadKeywords( jsonConfig );
|
||||
BOOST_CHECK(parser->hasKeyword("BPR"));
|
||||
BOOST_CHECK(parser->hasKeyword("WWCT"));
|
||||
BOOST_CHECK(parser->hasKeyword("EQUIL"));
|
||||
}
|
||||
//BOOST_AUTO_TEST_CASE(loadKeywordsJSON_manyKeywords_returnstrue) {
|
||||
// ParserPtr parser(new Parser());
|
||||
// Json::JsonObject jsonConfig( "[{\"name\" : \"BPR\" , \"size\" : 100}, {\"name\" : \"WWCT\"} , {\"name\" : \"EQUIL\" , \"size\" : 100}]");
|
||||
// parser->loadKeywords( jsonConfig );
|
||||
//
|
||||
// parser->parse("testdata/someobscureelements.data");
|
||||
//}
|
||||
|
@ -37,7 +37,7 @@ using namespace Opm;
|
||||
|
||||
BOOST_AUTO_TEST_CASE( parse_EQUIL_OK ) {
|
||||
ParserPtr parser(new Parser(JSON_CONFIG_FILE));
|
||||
boost::filesystem::path wconhistFile("testdata/EQUIL/EQUIL1");
|
||||
boost::filesystem::path wconhistFile("testdata/integration_tests/EQUIL/EQUIL1");
|
||||
DeckPtr deck = parser->parse(wconhistFile.string());
|
||||
DeckKeywordConstPtr kw1 = deck->getKeyword("EQUIL" , 0);
|
||||
BOOST_CHECK_EQUAL( 3U , kw1->size() );
|
||||
|
@ -37,7 +37,7 @@ using namespace Opm;
|
||||
|
||||
BOOST_AUTO_TEST_CASE( parse_WCHONHIST_OK ) {
|
||||
ParserPtr parser(new Parser(JSON_CONFIG_FILE));
|
||||
boost::filesystem::path wconhistFile("testdata/WCONHIST/WCONHIST1");
|
||||
boost::filesystem::path wconhistFile("testdata/integration_tests/WCONHIST/WCONHIST1");
|
||||
DeckPtr deck = parser->parse(wconhistFile.string());
|
||||
DeckKeywordConstPtr kw1 = deck->getKeyword("WCONHIST" , 0);
|
||||
BOOST_CHECK_EQUAL( 3U , kw1->size() );
|
||||
|
35
testdata/integration_tests/someobscureelements.data
vendored
Normal file
35
testdata/integration_tests/someobscureelements.data
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
-- Dette er en supertest - OK
|
||||
OIL
|
||||
|
||||
-- Saa bare en - OK
|
||||
--INCLUDE
|
||||
-- 'include path/readthis.sch' /
|
||||
---- Saa kommer en for lang en, skal bli "trunkert", slik at keywordet blir ABCXYZFF - OK
|
||||
|
||||
GRIDUNIT Tull kommer her
|
||||
-- Saa kommer det data
|
||||
METRES /
|
||||
|
||||
-- Og en med tall - OK
|
||||
|
||||
RADFIN4
|
||||
213 123 123 /
|
||||
|
||||
-- Og en med tall først- Ikke OK
|
||||
--
|
||||
--5ABCADFC
|
||||
--
|
||||
--
|
||||
---- Og en med mellomrom etter, og et ubestemt antall, terminert av / - OK
|
||||
--
|
||||
--ABCDAD
|
||||
-- 4.5 5 5 /
|
||||
-- 3 3 'FISK_1' /
|
||||
--/
|
||||
--
|
||||
---- Og en med liten bokstav i IKKE OK
|
||||
--
|
||||
--ABCDAd
|
||||
--
|
||||
---- Og en kommentar med space foran, det er ok
|
||||
-- -- Hei her er jeg.
|
Loading…
Reference in New Issue
Block a user