Fixed some rotten pointer/alloc code. Updated data paths

This commit is contained in:
Kristian Flikka
2013-11-26 14:46:07 +01:00
parent 111c9ee445
commit 3f68cbfe1b
2 changed files with 7 additions and 5 deletions

View File

@@ -60,6 +60,7 @@ list (APPEND TEST_DATA_FILES
if (INCLUDE_NON_PUBLIC_TESTS) if (INCLUDE_NON_PUBLIC_TESTS)
list (APPEND TEST_DATA_FILES list (APPEND TEST_DATA_FILES
tests/non_public/SPE1_opm.DATA tests/non_public/SPE1_opm.DATA
tests/non_public/spe1.xml
) )
endif() endif()

View File

@@ -176,7 +176,8 @@ std::vector<BlackoilState> runWithNewParser(parameter::ParameterGroup param) {
std::vector<BlackoilState> state_collection; std::vector<BlackoilState> state_collection;
double gravity[3] = {0.0}; double gravity[3] = {0.0};
std::string deck_filename = "SPE1_opm.DATA"; boost::filesystem::path test_data("non_public/SPE1_opm.DATA");
std::string deck_filename = test_data.native_file_string();
deck.reset(new EclipseGridParser(deck_filename)); deck.reset(new EclipseGridParser(deck_filename));
// Grid init // Grid init
grid.reset(new GridManager(*deck)); grid.reset(new GridManager(*deck));
@@ -269,10 +270,10 @@ std::vector<BlackoilState> runWithNewParser(parameter::ParameterGroup param) {
BOOST_AUTO_TEST_CASE(SPE1_runWithOldAndNewParser_BlackOilStateEqual) { BOOST_AUTO_TEST_CASE(SPE1_runWithOldAndNewParser_BlackOilStateEqual) {
int argc = 2; boost::filesystem::path test_data("non_public/spe1.xml");
const char ** argv = (const char **)malloc(2* sizeof(argv)); std::string deck_filename = test_data.native_file_string();
argv[1] = "spe1.xml"; const char * argv[] = { "", deck_filename.c_str()};
parameter::ParameterGroup param(argc, argv, false); parameter::ParameterGroup param(2, argv, false);
std::vector<BlackoilState> runWithOldParserStates = runWithOldParser(param); std::vector<BlackoilState> runWithOldParserStates = runWithOldParser(param);
std::vector<BlackoilState> runWithNewParserStates = runWithNewParser(param); std::vector<BlackoilState> runWithNewParserStates = runWithNewParser(param);