Silence warnings in test programs.

This commit is contained in:
Atgeirr Flø Rasmussen 2015-12-14 15:25:27 +01:00
parent c8a1492ca9
commit 186d77867a
2 changed files with 10 additions and 6 deletions

View File

@ -106,12 +106,12 @@ BOOST_AUTO_TEST_CASE(Processing)
auto nnc2_index = 1 + cart_dims[0] * (0 + cart_dims[1] * 3); auto nnc2_index = 1 + cart_dims[0] * (0 + cart_dims[1] * 3);
BOOST_CHECK_EQUAL(nncdata[0].cell1, nnc1_index); BOOST_CHECK_EQUAL(nncdata[0].cell1, nnc1_index);
BOOST_CHECK_EQUAL(nncdata[0].cell2, nnc2_index); BOOST_CHECK_EQUAL(nncdata[0].cell2, nnc2_index);
double factor = Opm::prefix::centi*Opm::unit::Poise
* Opm::unit::cubic(Opm::unit::meter)
/ Opm::unit::day
/ Opm::unit::barsa;
double trans = unit::convert::to(nncdata[0].trans,factor);
std::cout << "WARNING. The opmfil option is hardcoded i.e. the calculated transmissibility is wrong"; std::cout << "WARNING. The opmfil option is hardcoded i.e. the calculated transmissibility is wrong";
//BOOST_CHECK(std::fabs(trans-4.26350022) < 1e-3); // double factor = Opm::prefix::centi*Opm::unit::Poise
// * Opm::unit::cubic(Opm::unit::meter)
// / Opm::unit::day
// / Opm::unit::barsa;
// double trans = unit::convert::to(nncdata[0].trans, factor);
//BOOST_CHECK(std::fabs(trans - 4.26350022) < 1e-3);
} }

View File

@ -27,8 +27,12 @@
#define NVERBOSE // Suppress own messages when throw()ing #define NVERBOSE // Suppress own messages when throw()ing
#define BOOST_TEST_MODULE RelpermDiagnostics #define BOOST_TEST_MODULE RelpermDiagnostics
#include <opm/common/utility/platform_dependent/disable_warnings.h>
#include <boost/test/unit_test.hpp> #include <boost/test/unit_test.hpp>
#include <boost/test/floating_point_comparison.hpp> #include <boost/test/floating_point_comparison.hpp>
#include <opm/common/utility/platform_dependent/reenable_warnings.h>
#include <opm/core/grid.h> #include <opm/core/grid.h>
#include <opm/core/grid/cart_grid.h> #include <opm/core/grid/cart_grid.h>