fixed: earlier boosts did not support command line parameter separation
for older versions we will thus see '--' as argv[1] and the actual parameter as argv[2].
This commit is contained in:
parent
2fec8a3c16
commit
fa670d7042
@ -23,6 +23,8 @@ along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
#include <boost/version.hpp>
|
||||
|
||||
#include <opm/input/eclipse/Python/Python.hpp>
|
||||
#include <opm/input/eclipse/Schedule/Schedule.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/SimulationConfig/ThresholdPressure.hpp>
|
||||
@ -42,7 +44,11 @@ along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
||||
using namespace Opm;
|
||||
|
||||
inline std::string prepath() {
|
||||
#if BOOST_VERSION / 100000 == 1 && BOOST_VERSION / 100 % 1000 < 71
|
||||
return boost::unit_test::framework::master_test_suite().argv[2];
|
||||
#else
|
||||
return boost::unit_test::framework::master_test_suite().argv[1];
|
||||
#endif
|
||||
}
|
||||
|
||||
static Deck createDeckTOP() {
|
||||
|
@ -21,6 +21,8 @@
|
||||
#define BOOST_TEST_MODULE ParserTests
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
#include <boost/version.hpp>
|
||||
|
||||
#include <filesystem>
|
||||
#include <iostream>
|
||||
#include <opm/common/utility/OpmInputError.hpp>
|
||||
@ -34,7 +36,11 @@
|
||||
#include <iostream>
|
||||
|
||||
inline std::string prefix() {
|
||||
#if BOOST_VERSION / 100000 == 1 && BOOST_VERSION / 100 % 1000 < 71
|
||||
return boost::unit_test::framework::master_test_suite().argv[2];
|
||||
#else
|
||||
return boost::unit_test::framework::master_test_suite().argv[1];
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -20,6 +20,8 @@
|
||||
#define BOOST_TEST_MODULE ParserTests
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
#include <boost/version.hpp>
|
||||
|
||||
#include <opm/json/JsonObject.hpp>
|
||||
|
||||
#include <opm/common/OpmLog/KeywordLocation.hpp>
|
||||
@ -68,7 +70,11 @@ constexpr ParserItem::itype DOUBLE = ParserItem::itype::DOUBLE;
|
||||
|
||||
|
||||
std::string prefix() {
|
||||
#if BOOST_VERSION / 100000 == 1 && BOOST_VERSION / 100 % 1000 < 71
|
||||
return boost::unit_test::framework::master_test_suite().argv[2];
|
||||
#else
|
||||
return boost::unit_test::framework::master_test_suite().argv[1];
|
||||
#endif
|
||||
}
|
||||
|
||||
ParserKeyword createDynamicSized(const std::string& kw) {
|
||||
|
@ -21,6 +21,8 @@
|
||||
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
#include <boost/version.hpp>
|
||||
|
||||
#include <opm/input/eclipse/Parser/ParserKeywords/P.hpp>
|
||||
#include <opm/input/eclipse/Parser/Parser.hpp>
|
||||
#include <opm/input/eclipse/Deck/Deck.hpp>
|
||||
@ -48,7 +50,11 @@
|
||||
using namespace Opm;
|
||||
|
||||
inline std::string prefix() {
|
||||
#if BOOST_VERSION / 100000 == 1 && BOOST_VERSION / 100 % 1000 < 71
|
||||
return boost::unit_test::framework::master_test_suite().argv[2];
|
||||
#else
|
||||
return boost::unit_test::framework::master_test_suite().argv[1];
|
||||
#endif
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE( PvtxNumTables1 ) {
|
||||
|
@ -21,6 +21,7 @@
|
||||
|
||||
#include <boost/test/unit_test.hpp>
|
||||
#include <boost/test/test_tools.hpp>
|
||||
#include <boost/version.hpp>
|
||||
|
||||
#include <opm/input/eclipse/Deck/Deck.hpp>
|
||||
#include <opm/input/eclipse/Parser/Parser.hpp>
|
||||
@ -36,7 +37,11 @@ using namespace Opm;
|
||||
namespace {
|
||||
|
||||
std::string prefix() {
|
||||
#if BOOST_VERSION / 100000 == 1 && BOOST_VERSION / 100 % 1000 < 71
|
||||
return boost::unit_test::framework::master_test_suite().argv[2];
|
||||
#else
|
||||
return boost::unit_test::framework::master_test_suite().argv[1];
|
||||
#endif
|
||||
}
|
||||
|
||||
Deck makeDeck(const std::string& fileName) {
|
||||
|
@ -21,6 +21,7 @@
|
||||
|
||||
#include <boost/test/unit_test.hpp>
|
||||
#include <boost/test/test_tools.hpp>
|
||||
#include <boost/version.hpp>
|
||||
|
||||
#include <opm/input/eclipse/Deck/Deck.hpp>
|
||||
#include <opm/input/eclipse/Parser/Parser.hpp>
|
||||
@ -36,7 +37,11 @@ using namespace Opm;
|
||||
namespace {
|
||||
|
||||
std::string prefix() {
|
||||
#if BOOST_VERSION / 100000 == 1 && BOOST_VERSION / 100 % 1000 < 71
|
||||
return boost::unit_test::framework::master_test_suite().argv[2];
|
||||
#else
|
||||
return boost::unit_test::framework::master_test_suite().argv[1];
|
||||
#endif
|
||||
}
|
||||
|
||||
Deck makeDeck(const std::string& fileName) {
|
||||
|
@ -22,6 +22,7 @@
|
||||
|
||||
#include <boost/test/unit_test.hpp>
|
||||
#include <boost/test/test_tools.hpp>
|
||||
#include <boost/version.hpp>
|
||||
|
||||
#include <opm/input/eclipse/Deck/Deck.hpp>
|
||||
#include <opm/input/eclipse/Deck/DeckKeyword.hpp>
|
||||
@ -34,7 +35,11 @@
|
||||
using namespace Opm;
|
||||
|
||||
inline std::string prefix() {
|
||||
#if BOOST_VERSION / 100000 == 1 && BOOST_VERSION / 100 % 1000 < 71
|
||||
return boost::unit_test::framework::master_test_suite().argv[2];
|
||||
#else
|
||||
return boost::unit_test::framework::master_test_suite().argv[1];
|
||||
#endif
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(CreateCPGrid) {
|
||||
|
@ -20,6 +20,7 @@
|
||||
#define BOOST_TEST_MODULE IOCONFIG_INTEGRATION_TEST
|
||||
#include <boost/test/unit_test.hpp>
|
||||
#include <boost/test/test_tools.hpp>
|
||||
#include <boost/version.hpp>
|
||||
|
||||
#include <ctime>
|
||||
#include <map>
|
||||
@ -40,7 +41,11 @@ using namespace Opm;
|
||||
namespace {
|
||||
|
||||
std::string path_prefix() {
|
||||
#if BOOST_VERSION / 100000 == 1 && BOOST_VERSION / 100 % 1000 < 71
|
||||
return boost::unit_test::framework::master_test_suite().argv[2];
|
||||
#else
|
||||
return boost::unit_test::framework::master_test_suite().argv[1];
|
||||
#endif
|
||||
}
|
||||
|
||||
void verifyRestartConfig( const Schedule& sched, std::map<int, boost::gregorian::date>& rptConfig) {
|
||||
|
@ -20,6 +20,8 @@
|
||||
#define BOOST_TEST_MODULE ParserIntegrationTests
|
||||
#include <boost/test/unit_test.hpp>
|
||||
#include <boost/test/test_tools.hpp>
|
||||
#include <boost/version.hpp>
|
||||
|
||||
#include <opm/common/utility/OpmInputError.hpp>
|
||||
|
||||
#include <opm/input/eclipse/Deck/Deck.hpp>
|
||||
@ -37,7 +39,11 @@
|
||||
using namespace Opm;
|
||||
|
||||
inline std::string pathprefix() {
|
||||
#if BOOST_VERSION / 100000 == 1 && BOOST_VERSION / 100 % 1000 < 71
|
||||
return boost::unit_test::framework::master_test_suite().argv[2];
|
||||
#else
|
||||
return boost::unit_test::framework::master_test_suite().argv[1];
|
||||
#endif
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
@ -20,6 +20,8 @@
|
||||
#define BOOST_TEST_MODULE ParserKeywordsIntegrationTests
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
#include <boost/version.hpp>
|
||||
|
||||
#include <opm/common/utility/OpmInputError.hpp>
|
||||
#include <opm/input/eclipse/Deck/Deck.hpp>
|
||||
#include <opm/input/eclipse/Python/Python.hpp>
|
||||
@ -45,7 +47,11 @@
|
||||
using namespace Opm;
|
||||
|
||||
inline std::string pathprefix() {
|
||||
#if BOOST_VERSION / 100000 == 1 && BOOST_VERSION / 100 % 1000 < 71
|
||||
return boost::unit_test::framework::master_test_suite().argv[2];
|
||||
#else
|
||||
return boost::unit_test::framework::master_test_suite().argv[1];
|
||||
#endif
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE( debug ) {
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
#define BOOST_TEST_MODULE ParserIntegrationTests
|
||||
#include <boost/test/unit_test.hpp>
|
||||
#include <boost/version.hpp>
|
||||
|
||||
#include <opm/input/eclipse/Deck/Deck.hpp>
|
||||
#include <opm/input/eclipse/Parser/Parser.hpp>
|
||||
@ -31,7 +32,11 @@
|
||||
using namespace Opm;
|
||||
|
||||
inline std::string pathprefix() {
|
||||
#if BOOST_VERSION / 100000 == 1 && BOOST_VERSION / 100 % 1000 < 71
|
||||
return boost::unit_test::framework::master_test_suite().argv[2];
|
||||
#else
|
||||
return boost::unit_test::framework::master_test_suite().argv[1];
|
||||
#endif
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE( parse_polymer_tables ) {
|
||||
|
@ -22,6 +22,7 @@
|
||||
|
||||
#include <boost/test/unit_test.hpp>
|
||||
#include <boost/test/test_tools.hpp>
|
||||
#include <boost/version.hpp>
|
||||
|
||||
#include <opm/input/eclipse/Deck/Deck.hpp>
|
||||
#include <opm/input/eclipse/Parser/Parser.hpp>
|
||||
@ -45,7 +46,11 @@ using namespace Opm;
|
||||
|
||||
|
||||
inline std::string pathprefix() {
|
||||
#if BOOST_VERSION / 100000 == 1 && BOOST_VERSION / 100 % 1000 < 71
|
||||
return boost::unit_test::framework::master_test_suite().argv[2];
|
||||
#else
|
||||
return boost::unit_test::framework::master_test_suite().argv[1];
|
||||
#endif
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(CreateSchedule) {
|
||||
|
@ -18,6 +18,7 @@
|
||||
|
||||
#define BOOST_TEST_MODULE TransMultTests
|
||||
#include <boost/test/unit_test.hpp>
|
||||
#include <boost/version.hpp>
|
||||
|
||||
#include <opm/input/eclipse/Deck/Deck.hpp>
|
||||
#include <opm/input/eclipse/Parser/Parser.hpp>
|
||||
@ -29,7 +30,11 @@
|
||||
using namespace Opm;
|
||||
|
||||
inline std::string pathprefix() {
|
||||
#if BOOST_VERSION / 100000 == 1 && BOOST_VERSION / 100 % 1000 < 71
|
||||
return boost::unit_test::framework::master_test_suite().argv[2];
|
||||
#else
|
||||
return boost::unit_test::framework::master_test_suite().argv[1];
|
||||
#endif
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(MULTFLT_IN_SCHEDULE) {
|
||||
|
Loading…
Reference in New Issue
Block a user