Merge pull request #1461 from akva2/use_std_filesystem
Replace boost::filesystem with std::filesystem
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
#include <stdexcept>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <opm/common/utility/FileSystem.hpp>
|
||||
|
||||
#define BOOST_TEST_MODULE EclipseGridTests
|
||||
#include <boost/test/unit_test.hpp>
|
||||
@@ -1800,14 +1800,14 @@ BOOST_AUTO_TEST_CASE(SAVE_FIELD_UNITS) {
|
||||
time_t timer;
|
||||
time(&timer);
|
||||
|
||||
std::string cwd = boost::filesystem::current_path().c_str();
|
||||
std::string cwd = Opm::filesystem::current_path().c_str();
|
||||
std::string testDir = cwd + "/tmp_dir_" + std::to_string(timer);
|
||||
|
||||
if ( boost::filesystem::exists( testDir )) {
|
||||
boost::filesystem::remove_all(testDir);
|
||||
if ( Opm::filesystem::exists( testDir )) {
|
||||
Opm::filesystem::remove_all(testDir);
|
||||
}
|
||||
|
||||
boost::filesystem::create_directory(testDir);
|
||||
Opm::filesystem::create_directory(testDir);
|
||||
|
||||
std::string fileName = testDir + "/" + "TMP.EGRID";
|
||||
grid1.save(fileName, formatted, nnc, units);
|
||||
@@ -1912,7 +1912,7 @@ BOOST_AUTO_TEST_CASE(SAVE_FIELD_UNITS) {
|
||||
BOOST_CHECK( ref3_mapaxes[n] == test_mapaxes3[n]);
|
||||
}
|
||||
|
||||
boost::filesystem::remove_all(testDir);
|
||||
Opm::filesystem::remove_all(testDir);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(SAVE_METRIC_UNITS) {
|
||||
@@ -1993,14 +1993,14 @@ BOOST_AUTO_TEST_CASE(SAVE_METRIC_UNITS) {
|
||||
time_t timer;
|
||||
time(&timer);
|
||||
|
||||
std::string cwd = boost::filesystem::current_path().c_str();
|
||||
std::string cwd = Opm::filesystem::current_path().c_str();
|
||||
std::string testDir = cwd + "/tmp_dir_" + std::to_string(timer);
|
||||
|
||||
if ( boost::filesystem::exists( testDir )) {
|
||||
boost::filesystem::remove_all(testDir);
|
||||
if ( Opm::filesystem::exists( testDir )) {
|
||||
Opm::filesystem::remove_all(testDir);
|
||||
}
|
||||
|
||||
boost::filesystem::create_directory(testDir);
|
||||
Opm::filesystem::create_directory(testDir);
|
||||
|
||||
std::string fileName = testDir + "/" + "TMP.FEGRID";
|
||||
grid1.save(fileName, formatted, nnc, units1);
|
||||
@@ -2105,7 +2105,7 @@ BOOST_AUTO_TEST_CASE(SAVE_METRIC_UNITS) {
|
||||
}
|
||||
|
||||
|
||||
boost::filesystem::remove_all(testDir);
|
||||
Opm::filesystem::remove_all(testDir);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(CalcCellDims) {
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
#include <opm/common/utility/FileSystem.hpp>
|
||||
#include <opm/parser/eclipse/Deck/Deck.hpp>
|
||||
#include <opm/parser/eclipse/Parser/Parser.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/IOConfig/IOConfig.hpp>
|
||||
@@ -263,7 +264,7 @@ BOOST_AUTO_TEST_CASE(OutputPaths) {
|
||||
BOOST_CHECK_EQUAL( output_dir2, config2.getOutputDir() );
|
||||
BOOST_CHECK_EQUAL( "TESTSTRING", config2.getBaseName() );
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
namespace fs = Opm::filesystem;
|
||||
|
||||
Deck deck3;
|
||||
deck3.setDataFile( "/path/to/testString.DATA" );
|
||||
|
||||
@@ -19,9 +19,9 @@
|
||||
|
||||
|
||||
#define BOOST_TEST_MODULE ParserTests
|
||||
#include <boost/filesystem/path.hpp>
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
#include <opm/common/utility/FileSystem.hpp>
|
||||
#include <opm/parser/eclipse/Parser/Parser.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParserKeyword.hpp>
|
||||
#include <opm/parser/eclipse/Deck/Deck.hpp>
|
||||
@@ -33,7 +33,7 @@ inline std::string prefix() {
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE(ParserKeyword_includeInvalid) {
|
||||
boost::filesystem::path inputFilePath(prefix() + "includeInvalid.data");
|
||||
Opm::filesystem::path inputFilePath(prefix() + "includeInvalid.data");
|
||||
|
||||
Opm::Parser parser;
|
||||
Opm::ParseContext parseContext;
|
||||
@@ -48,7 +48,7 @@ BOOST_AUTO_TEST_CASE(ParserKeyword_includeInvalid) {
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE(DATA_FILE_IS_SYMLINK) {
|
||||
boost::filesystem::path inputFilePath(prefix() + "includeSymlinkTestdata/symlink4/path/case.data");
|
||||
Opm::filesystem::path inputFilePath(prefix() + "includeSymlinkTestdata/symlink4/path/case.data");
|
||||
Opm::Parser parser;
|
||||
std::cout << "Input file: " << inputFilePath.string() << std::endl;
|
||||
auto deck = parser.parseFile(inputFilePath.string());
|
||||
@@ -59,7 +59,7 @@ BOOST_AUTO_TEST_CASE(DATA_FILE_IS_SYMLINK) {
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE(Verify_find_includes_Data_file_is_a_symlink) {
|
||||
boost::filesystem::path inputFilePath(prefix() + "includeSymlinkTestdata/symlink1/case_symlink.data");
|
||||
Opm::filesystem::path inputFilePath(prefix() + "includeSymlinkTestdata/symlink1/case_symlink.data");
|
||||
Opm::Parser parser;
|
||||
auto deck = parser.parseFile(inputFilePath.string());
|
||||
|
||||
@@ -69,7 +69,7 @@ BOOST_AUTO_TEST_CASE(Verify_find_includes_Data_file_is_a_symlink) {
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE(Verify_find_includes_Data_file_has_include_that_is_a_symlink) {
|
||||
boost::filesystem::path inputFilePath(prefix() + "includeSymlinkTestdata/symlink2/caseWithIncludedSymlink.data");
|
||||
Opm::filesystem::path inputFilePath(prefix() + "includeSymlinkTestdata/symlink2/caseWithIncludedSymlink.data");
|
||||
Opm::Parser parser;
|
||||
auto deck = parser.parseFile(inputFilePath.string());
|
||||
|
||||
@@ -79,7 +79,7 @@ BOOST_AUTO_TEST_CASE(Verify_find_includes_Data_file_has_include_that_is_a_symlin
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE(Verify_find_includes_Data_file_has_include_file_that_again_includes_a_symlink) {
|
||||
boost::filesystem::path inputFilePath(prefix() + "includeSymlinkTestdata/symlink3/case.data");
|
||||
Opm::filesystem::path inputFilePath(prefix() + "includeSymlinkTestdata/symlink3/case.data");
|
||||
Opm::Parser parser;
|
||||
auto deck = parser.parseFile(inputFilePath.string());
|
||||
|
||||
@@ -89,7 +89,7 @@ BOOST_AUTO_TEST_CASE(Verify_find_includes_Data_file_has_include_file_that_again_
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE(ParserKeyword_includeValid) {
|
||||
boost::filesystem::path inputFilePath(prefix() + "includeValid.data");
|
||||
Opm::filesystem::path inputFilePath(prefix() + "includeValid.data");
|
||||
|
||||
Opm::Parser parser;
|
||||
auto deck = parser.parseFile(inputFilePath.string());
|
||||
@@ -104,9 +104,9 @@ BOOST_AUTO_TEST_CASE(ParserKeyword_includeValid) {
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE(ParserKeyword_includeWrongCase) {
|
||||
boost::filesystem::path inputFile1Path(prefix() + "includeWrongCase1.data");
|
||||
boost::filesystem::path inputFile2Path(prefix() + "includeWrongCase2.data");
|
||||
boost::filesystem::path inputFile3Path(prefix() + "includeWrongCase3.data");
|
||||
Opm::filesystem::path inputFile1Path(prefix() + "includeWrongCase1.data");
|
||||
Opm::filesystem::path inputFile2Path(prefix() + "includeWrongCase2.data");
|
||||
Opm::filesystem::path inputFile3Path(prefix() + "includeWrongCase3.data");
|
||||
|
||||
Opm::Parser parser;
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
#include <opm/json/JsonObject.hpp>
|
||||
|
||||
#include <opm/common/utility/FileSystem.hpp>
|
||||
#include <opm/parser/eclipse/Units/UnitSystem.hpp>
|
||||
#include <opm/parser/eclipse/Deck/Deck.hpp>
|
||||
#include <opm/parser/eclipse/Deck/DeckKeyword.hpp>
|
||||
@@ -187,28 +188,28 @@ BOOST_AUTO_TEST_CASE(loadKeywordsJSON_manyKeywords_returnstrue) {
|
||||
|
||||
BOOST_AUTO_TEST_CASE(loadKeywordFromFile_fileDoesNotExist_returnsFalse) {
|
||||
Parser parser;
|
||||
boost::filesystem::path configFile("File/does/not/exist");
|
||||
Opm::filesystem::path configFile("File/does/not/exist");
|
||||
BOOST_CHECK_EQUAL( false , parser.loadKeywordFromFile( configFile ));
|
||||
}
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE(loadKeywordFromFile_invalidJson_returnsFalse) {
|
||||
Parser parser;
|
||||
boost::filesystem::path configFile(prefix() + "json/example_invalid_json");
|
||||
Opm::filesystem::path configFile(prefix() + "json/example_invalid_json");
|
||||
BOOST_CHECK_EQUAL( false , parser.loadKeywordFromFile( configFile ));
|
||||
}
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE(loadKeywordFromFile_invalidConfig_returnsFalse) {
|
||||
Parser parser;
|
||||
boost::filesystem::path configFile(prefix() + "json/example_missing_name.json");
|
||||
Opm::filesystem::path configFile(prefix() + "json/example_missing_name.json");
|
||||
BOOST_CHECK_EQUAL( false , parser.loadKeywordFromFile( configFile ));
|
||||
}
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE(loadKeywordFromFile_validKeyword_returnsTrueHasKeyword) {
|
||||
Parser parser( false );
|
||||
boost::filesystem::path configFile(prefix() + "json/BPR");
|
||||
Opm::filesystem::path configFile(prefix() + "json/BPR");
|
||||
BOOST_CHECK_EQUAL( true , parser.loadKeywordFromFile( configFile ));
|
||||
BOOST_CHECK_EQUAL( 1U , parser.size() );
|
||||
BOOST_CHECK_EQUAL( true , parser.isRecognizedKeyword("BPR") );
|
||||
@@ -218,14 +219,14 @@ BOOST_AUTO_TEST_CASE(loadKeywordFromFile_validKeyword_returnsTrueHasKeyword) {
|
||||
|
||||
BOOST_AUTO_TEST_CASE(loadConfigFromDirectory_directoryDoesNotexist_throws) {
|
||||
Parser parser;
|
||||
boost::filesystem::path configPath("path/does/not/exist");
|
||||
Opm::filesystem::path configPath("path/does/not/exist");
|
||||
BOOST_CHECK_THROW(parser.loadKeywordsFromDirectory( configPath), std::invalid_argument);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(loadConfigFromDirectory_notRecursive_allNames) {
|
||||
Parser parser( false );
|
||||
BOOST_CHECK_EQUAL(false , parser.isRecognizedKeyword("BPR"));
|
||||
boost::filesystem::path configPath(prefix() + "config/directory1");
|
||||
Opm::filesystem::path configPath(prefix() + "config/directory1");
|
||||
BOOST_CHECK_NO_THROW(parser.loadKeywordsFromDirectory( configPath, false));
|
||||
BOOST_CHECK(parser.isRecognizedKeyword("WWCT"));
|
||||
BOOST_CHECK_EQUAL(true , parser.isRecognizedKeyword("BPR"));
|
||||
@@ -235,7 +236,7 @@ BOOST_AUTO_TEST_CASE(loadConfigFromDirectory_notRecursive_allNames) {
|
||||
|
||||
BOOST_AUTO_TEST_CASE(loadConfigFromDirectory_notRecursive_strictNames) {
|
||||
Parser parser( false );
|
||||
boost::filesystem::path configPath(prefix() + "config/directory1");
|
||||
Opm::filesystem::path configPath(prefix() + "config/directory1");
|
||||
BOOST_CHECK_NO_THROW(parser.loadKeywordsFromDirectory( configPath, false));
|
||||
BOOST_CHECK(parser.isRecognizedKeyword("WWCT"));
|
||||
// the file name for the following keyword is "Bpr", but that
|
||||
@@ -248,7 +249,7 @@ BOOST_AUTO_TEST_CASE(loadConfigFromDirectory_notRecursive_strictNames) {
|
||||
BOOST_AUTO_TEST_CASE(loadConfigFromDirectory_Recursive_allNames) {
|
||||
Parser parser( false );
|
||||
BOOST_CHECK_EQUAL(false , parser.isRecognizedKeyword("BPR"));
|
||||
boost::filesystem::path configPath(prefix() + "config/directory1");
|
||||
Opm::filesystem::path configPath(prefix() + "config/directory1");
|
||||
BOOST_CHECK_NO_THROW(parser.loadKeywordsFromDirectory( configPath, true));
|
||||
BOOST_CHECK(parser.isRecognizedKeyword("WWCT"));
|
||||
BOOST_CHECK_EQUAL(true , parser.isRecognizedKeyword("BPR"));
|
||||
@@ -259,7 +260,7 @@ BOOST_AUTO_TEST_CASE(loadConfigFromDirectory_Recursive_allNames) {
|
||||
BOOST_AUTO_TEST_CASE(loadConfigFromDirectory_default) {
|
||||
Parser parser( false );
|
||||
BOOST_CHECK_EQUAL(false , parser.isRecognizedKeyword("BPR"));
|
||||
boost::filesystem::path configPath(prefix() + "config/directory1");
|
||||
Opm::filesystem::path configPath(prefix() + "config/directory1");
|
||||
BOOST_CHECK_NO_THROW(parser.loadKeywordsFromDirectory( configPath ));
|
||||
BOOST_CHECK(parser.isRecognizedKeyword("WWCT"));
|
||||
// the file name for the following keyword is "Bpr", but that
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/VFPInjTable.hpp>
|
||||
|
||||
#include <boost/date_time/posix_time/posix_time.hpp>
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <opm/common/utility/FileSystem.hpp>
|
||||
|
||||
#include <stdexcept>
|
||||
#include <iostream>
|
||||
@@ -53,7 +53,7 @@ inline std::string prefix() {
|
||||
|
||||
BOOST_AUTO_TEST_CASE( PvtxNumTables1 ) {
|
||||
Parser parser;
|
||||
boost::filesystem::path deckFile(prefix() + "TABLES/PVTX1.DATA");
|
||||
Opm::filesystem::path deckFile(prefix() + "TABLES/PVTX1.DATA");
|
||||
auto deck = parser.parseFile(deckFile.string());
|
||||
BOOST_CHECK_EQUAL( PvtxTable::numTables( deck.getKeyword<ParserKeywords::PVTO>()) , 1);
|
||||
|
||||
@@ -66,7 +66,7 @@ BOOST_AUTO_TEST_CASE( PvtxNumTables1 ) {
|
||||
|
||||
BOOST_AUTO_TEST_CASE( PvtxNumTables2 ) {
|
||||
Parser parser;
|
||||
boost::filesystem::path deckFile(prefix() + "TABLES/PVTO2.DATA");
|
||||
Opm::filesystem::path deckFile(prefix() + "TABLES/PVTO2.DATA");
|
||||
auto deck = parser.parseFile(deckFile.string());
|
||||
BOOST_CHECK_EQUAL( PvtxTable::numTables( deck.getKeyword<ParserKeywords::PVTO>()) , 3);
|
||||
|
||||
@@ -118,7 +118,7 @@ BOOST_AUTO_TEST_CASE( PvtxNumTables3 ) {
|
||||
|
||||
BOOST_AUTO_TEST_CASE( PVTOSaturatedTable ) {
|
||||
Parser parser;
|
||||
boost::filesystem::path deckFile(prefix() + "TABLES/PVTX1.DATA");
|
||||
Opm::filesystem::path deckFile(prefix() + "TABLES/PVTX1.DATA");
|
||||
auto deck = parser.parseFile(deckFile.string());
|
||||
Opm::TableManager tables(deck);
|
||||
const auto& pvtoTables = tables.getPvtoTables( );
|
||||
@@ -164,7 +164,7 @@ BOOST_AUTO_TEST_CASE( PVTOSaturatedTable ) {
|
||||
|
||||
BOOST_AUTO_TEST_CASE( PVTGSaturatedTable ) {
|
||||
Parser parser;
|
||||
boost::filesystem::path deckFile(prefix() + "TABLES/PVTX1.DATA");
|
||||
Opm::filesystem::path deckFile(prefix() + "TABLES/PVTX1.DATA");
|
||||
auto deck = parser.parseFile(deckFile.string());
|
||||
Opm::TableManager tables(deck);
|
||||
const auto& pvtgTables = tables.getPvtgTables( );
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#include <boost/test/unit_test.hpp>
|
||||
#include <boost/test/test_tools.hpp>
|
||||
|
||||
#include <boost/filesystem/path.hpp>
|
||||
#include <opm/common/utility/FileSystem.hpp>
|
||||
|
||||
#include <opm/parser/eclipse/Deck/Deck.hpp>
|
||||
#include <opm/parser/eclipse/Parser/Parser.hpp>
|
||||
@@ -38,7 +38,7 @@ inline std::string prefix() {
|
||||
|
||||
inline Deck makeDeck(const std::string& fileName) {
|
||||
Parser parser;
|
||||
boost::filesystem::path boxFile(fileName);
|
||||
Opm::filesystem::path boxFile(fileName);
|
||||
return parser.parseFile(boxFile.string());
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,8 @@
|
||||
#include <boost/test/unit_test.hpp>
|
||||
#include <boost/test/test_tools.hpp>
|
||||
#include <boost/date_time/posix_time/posix_time.hpp>
|
||||
#include <boost/filesystem/path.hpp>
|
||||
|
||||
#include <opm/common/utility/FileSystem.hpp>
|
||||
|
||||
#include <opm/parser/eclipse/Deck/Deck.hpp>
|
||||
#include <opm/parser/eclipse/Deck/DeckKeyword.hpp>
|
||||
@@ -40,7 +41,7 @@ inline std::string prefix() {
|
||||
|
||||
BOOST_AUTO_TEST_CASE(CreateCPGrid) {
|
||||
Parser parser;
|
||||
boost::filesystem::path scheduleFile(prefix() + "GRID/CORNERPOINT.DATA");
|
||||
Opm::filesystem::path scheduleFile(prefix() + "GRID/CORNERPOINT.DATA");
|
||||
auto deck = parser.parseFile(scheduleFile.string());
|
||||
EclipseState es(deck);
|
||||
const auto& grid = es.getInputGrid();
|
||||
@@ -54,7 +55,7 @@ BOOST_AUTO_TEST_CASE(CreateCPGrid) {
|
||||
|
||||
BOOST_AUTO_TEST_CASE(CreateCPActnumGrid) {
|
||||
Parser parser;
|
||||
boost::filesystem::path scheduleFile(prefix() + "GRID/CORNERPOINT_ACTNUM.DATA");
|
||||
Opm::filesystem::path scheduleFile(prefix() + "GRID/CORNERPOINT_ACTNUM.DATA");
|
||||
auto deck = parser.parseFile(scheduleFile.string());
|
||||
EclipseState es(deck);
|
||||
const auto& grid = es.getInputGrid();
|
||||
@@ -68,7 +69,7 @@ BOOST_AUTO_TEST_CASE(CreateCPActnumGrid) {
|
||||
|
||||
BOOST_AUTO_TEST_CASE(ExportFromCPGridAllActive) {
|
||||
Parser parser;
|
||||
boost::filesystem::path scheduleFile(prefix() + "GRID/CORNERPOINT.DATA");
|
||||
Opm::filesystem::path scheduleFile(prefix() + "GRID/CORNERPOINT.DATA");
|
||||
auto deck = parser.parseFile(scheduleFile.string());
|
||||
EclipseState es(deck);
|
||||
const auto& grid = es.getInputGrid();
|
||||
@@ -84,7 +85,7 @@ BOOST_AUTO_TEST_CASE(ExportFromCPGridAllActive) {
|
||||
|
||||
BOOST_AUTO_TEST_CASE(ExportFromCPGridACTNUM) {
|
||||
Parser parser;
|
||||
boost::filesystem::path scheduleFile(prefix() + "GRID/CORNERPOINT_ACTNUM.DATA");
|
||||
Opm::filesystem::path scheduleFile(prefix() + "GRID/CORNERPOINT_ACTNUM.DATA");
|
||||
auto deck = parser.parseFile(scheduleFile.string());
|
||||
EclipseState es(deck);
|
||||
auto& grid = es.getInputGrid();
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#define BOOST_TEST_MODULE ParserIntegrationTests
|
||||
#include <boost/test/unit_test.hpp>
|
||||
#include <boost/test/test_tools.hpp>
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <opm/common/utility/FileSystem.hpp>
|
||||
#include <ostream>
|
||||
#include <fstream>
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#include <opm/parser/eclipse/Parser/ParserEnums.hpp>
|
||||
|
||||
using namespace Opm;
|
||||
using namespace boost::filesystem;
|
||||
using namespace Opm::filesystem;
|
||||
|
||||
static void
|
||||
createDeckWithInclude(path& datafile, std::string addEndKeyword)
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#define BOOST_TEST_MODULE ParserIntegrationTests
|
||||
#include <boost/test/unit_test.hpp>
|
||||
#include <boost/test/test_tools.hpp>
|
||||
#include <boost/filesystem/path.hpp>
|
||||
#include <opm/common/utility/FileSystem.hpp>
|
||||
|
||||
#include <opm/parser/eclipse/Deck/Deck.hpp>
|
||||
#include <opm/parser/eclipse/Deck/DeckKeyword.hpp>
|
||||
@@ -72,7 +72,7 @@ Parser createWWCTParser() {
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(parse_fileWithWWCTKeyword_deckReturned) {
|
||||
boost::filesystem::path singleKeywordFile(pathprefix() + "wwct.data");
|
||||
Opm::filesystem::path singleKeywordFile(pathprefix() + "wwct.data");
|
||||
auto parser = createWWCTParser();
|
||||
BOOST_CHECK( parser.isRecognizedKeyword("WWCT"));
|
||||
BOOST_CHECK( parser.isRecognizedKeyword("SUMMARY"));
|
||||
@@ -108,7 +108,7 @@ BOOST_AUTO_TEST_CASE(parse_streamWithWWCTKeyword_deckReturned) {
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(parse_fileWithWWCTKeyword_deckHasWWCT) {
|
||||
boost::filesystem::path singleKeywordFile(pathprefix() + "wwct.data");
|
||||
Opm::filesystem::path singleKeywordFile(pathprefix() + "wwct.data");
|
||||
auto parser = createWWCTParser();
|
||||
auto deck = parser.parseFile(singleKeywordFile.string());
|
||||
BOOST_CHECK(deck.hasKeyword("SUMMARY"));
|
||||
@@ -116,7 +116,7 @@ BOOST_AUTO_TEST_CASE(parse_fileWithWWCTKeyword_deckHasWWCT) {
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(parse_fileWithWWCTKeyword_dataIsCorrect) {
|
||||
boost::filesystem::path singleKeywordFile(pathprefix() + "wwct.data");
|
||||
Opm::filesystem::path singleKeywordFile(pathprefix() + "wwct.data");
|
||||
auto parser = createWWCTParser();
|
||||
auto deck = parser.parseFile(singleKeywordFile.string());
|
||||
BOOST_CHECK_EQUAL("WELL-1", deck.getKeyword("WWCT" , 0).getRecord(0).getItem(0).get< std::string >(0));
|
||||
@@ -157,14 +157,14 @@ static Parser createBPRParser() {
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(parse_fileWithBPRKeyword_deckReturned) {
|
||||
boost::filesystem::path singleKeywordFile(pathprefix() + "bpr.data");
|
||||
Opm::filesystem::path singleKeywordFile(pathprefix() + "bpr.data");
|
||||
auto parser = createBPRParser();
|
||||
|
||||
BOOST_CHECK_NO_THROW(parser.parseFile(singleKeywordFile.string()));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(parse_fileWithBPRKeyword_DeckhasBRP) {
|
||||
boost::filesystem::path singleKeywordFile(pathprefix() + "bpr.data");
|
||||
Opm::filesystem::path singleKeywordFile(pathprefix() + "bpr.data");
|
||||
|
||||
auto parser = createBPRParser();
|
||||
auto deck = parser.parseFile(singleKeywordFile.string());
|
||||
@@ -173,7 +173,7 @@ BOOST_AUTO_TEST_CASE(parse_fileWithBPRKeyword_DeckhasBRP) {
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(parse_fileWithBPRKeyword_dataiscorrect) {
|
||||
boost::filesystem::path singleKeywordFile(pathprefix() + "bpr.data");
|
||||
Opm::filesystem::path singleKeywordFile(pathprefix() + "bpr.data");
|
||||
|
||||
auto parser = createBPRParser();
|
||||
auto deck = parser.parseFile(singleKeywordFile.string());
|
||||
|
||||
Reference in New Issue
Block a user