11 #ifndef TEST_INTERFACE_MODELAUXCONTROL_H_ 12 #define TEST_INTERFACE_MODELAUXCONTROL_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/LocalConfiguration.h" 44 return theModelAuxControlFixture;
56 boost::scoped_ptr<const eckit::LocalConfiguration>
conf_;
66 boost::scoped_ptr<ModelAux_> bias(
new ModelAux_(Test_::resol(), Test_::config()));
67 BOOST_CHECK(bias.get());
70 BOOST_CHECK(!bias.get());
76 typedef ModelAuxControlFixture<MODEL> Test_;
79 boost::scoped_ptr<ModelAux_> bias(
new ModelAux_(Test_::resol(), Test_::config()));
81 boost::scoped_ptr<ModelAux_> other(
new ModelAux_(*bias));
82 BOOST_CHECK(other.get());
85 BOOST_CHECK(!other.get());
87 BOOST_CHECK(bias.get());
96 boost::scoped_ptr<ModelAux_> bias(
new ModelAux_(Test_::resol(), Test_::config()));
98 boost::scoped_ptr<ModelAux_> other(
new ModelAux_(Test_::resol(), *bias));
99 BOOST_CHECK(other.get());
102 BOOST_CHECK(!other.get());
104 BOOST_CHECK(bias.get());
117 boost::unit_test::test_suite * ts = BOOST_TEST_SUITE(
"interface/ModelAuxControl");
119 ts->add(BOOST_TEST_CASE(&testConstructor<MODEL>));
120 ts->add(BOOST_TEST_CASE(&testCopyConstructor<MODEL>));
121 ts->add(BOOST_TEST_CASE(&testChangeRes<MODEL>));
123 boost::unit_test::framework::master_test_suite().add(ts);
131 #endif // TEST_INTERFACE_MODELAUXCONTROL_H_
boost::scoped_ptr< Geometry_ > resol_
oops::Geometry< MODEL > Geometry_
void register_tests() const
static const eckit::Configuration & config()
~ModelAuxControlFixture()
boost::scoped_ptr< const eckit::LocalConfiguration > conf_
static const eckit::Configuration & config()
void testCopyConstructor()
oops::ModelAuxControl< MODEL > ModelAux_
std::string testid() const
static const Geometry_ & resol()
static ModelAuxControlFixture< MODEL > & getInstance()
virtual ~ModelAuxControl()