11 #ifndef TEST_INTERFACE_OBSAUXCONTROL_H_ 12 #define TEST_INTERFACE_OBSAUXCONTROL_H_ 16 #define BOOST_TEST_NO_MAIN 17 #define BOOST_TEST_ALTERNATIVE_INIT_API 18 #define BOOST_TEST_DYN_LINK 19 #include <boost/test/unit_test.hpp> 21 #include <boost/noncopyable.hpp> 22 #include <boost/scoped_ptr.hpp> 24 #include "eckit/config/Configuration.h" 39 return theObsAuxControlFixture;
48 boost::scoped_ptr<const eckit::LocalConfiguration>
conf_;
57 boost::scoped_ptr<ObsAux_> bias(
new ObsAux_(Test_::config()));
58 BOOST_CHECK(bias.get());
61 BOOST_CHECK(!bias.get());
67 typedef ObsAuxControlFixture<MODEL> Test_;
70 boost::scoped_ptr<ObsAux_> bias(
new ObsAux_(Test_::config()));
72 boost::scoped_ptr<ObsAux_> other(
new ObsAux_(*bias));
73 BOOST_CHECK(other.get());
76 BOOST_CHECK(!other.get());
78 BOOST_CHECK(bias.get());
91 boost::unit_test::test_suite * ts = BOOST_TEST_SUITE(
"interface/ObsAuxControl");
93 ts->add(BOOST_TEST_CASE(&testConstructor<MODEL>));
94 ts->add(BOOST_TEST_CASE(&testCopyConstructor<MODEL>));
96 boost::unit_test::framework::master_test_suite().add(ts);
104 #endif // TEST_INTERFACE_OBSAUXCONTROL_H_ void register_tests() const
static const eckit::Configuration & config()
std::string testid() const
boost::scoped_ptr< const eckit::LocalConfiguration > conf_
void testCopyConstructor()
static const eckit::Configuration & config()
static ObsAuxControlFixture< MODEL > & getInstance()