13 #include <boost/scoped_ptr.hpp> 14 #include <boost/test/unit_test.hpp> 17 #include "eckit/config/LocalConfiguration.h" 26 class ObsBiasTestFixture : TestFixture {
30 nobias_.reset(
new eckit::LocalConfiguration());
34 boost::scoped_ptr<const eckit::LocalConfiguration>
biasconf_;
35 boost::scoped_ptr<const eckit::LocalConfiguration>
nobias_;
36 boost::scoped_ptr<const eckit::LocalConfiguration>
covconf_;
41 BOOST_FIXTURE_TEST_SUITE(test_obsBiasCovariance, ObsBiasTestFixture)
45 BOOST_CHECK_EQUAL(obcovar.
active(),
true);
50 BOOST_CHECK_EQUAL(obcovar.
active(),
false);
70 const double stdev = covconf_->getDouble(
"standard_deviation");
71 BOOST_CHECK_EQUAL(db2.
value(), db1.
value() * stdev * stdev);
84 BOOST_CHECK_EQUAL(db2.
value(), 0.0);
96 const double stdev = covconf_->getDouble(
"standard_deviation");
97 BOOST_CHECK_EQUAL(db2.
value(), db1.
value() * 1.0 / (stdev * stdev));
110 BOOST_CHECK_EQUAL(db2.
value(), 0.0);
114 BOOST_AUTO_TEST_SUITE_END()
boost::scoped_ptr< const eckit::LocalConfiguration > covconf_
void inverseMultiply(const ObsBiasCorrection &, ObsBiasCorrection &) const
boost::scoped_ptr< const eckit::LocalConfiguration > nobias_
void multiply(const ObsBiasCorrection &, ObsBiasCorrection &) const
BOOST_AUTO_TEST_CASE(test_GomL95_constructor)
boost::scoped_ptr< const eckit::LocalConfiguration > biasconf_
static const eckit::Configuration & config()