11 #ifndef TEST_INTERFACE_LOCATIONS_H_ 12 #define TEST_INTERFACE_LOCATIONS_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" 37 boost::scoped_ptr<Locations_> locs(
new Locations_(
conf));
38 BOOST_CHECK(locs.get());
41 BOOST_CHECK(!locs.get());
50 boost::scoped_ptr<Locations_> locs(
new Locations_(
conf));
51 BOOST_CHECK(locs.get());
53 boost::scoped_ptr<Locations_> other_locs(
new Locations_(*locs));
54 BOOST_CHECK(other_locs.get());
57 BOOST_CHECK(!locs.get());
60 BOOST_CHECK(!other_locs.get());
73 boost::unit_test::test_suite * ts = BOOST_TEST_SUITE(
"interface/Locations");
75 ts->add(BOOST_TEST_CASE(&testConstructor<MODEL>));
76 ts->add(BOOST_TEST_CASE(&testCopyConstructor<MODEL>));
78 boost::unit_test::framework::master_test_suite().add(ts);
86 #endif // TEST_INTERFACE_LOCATIONS_H_
void register_tests() const
static const eckit::Configuration & config()
void testCopyConstructor()
std::string testid() const