11 #ifndef TEST_INTERFACE_LOCALIZATION_H_
12 #define TEST_INTERFACE_LOCALIZATION_H_
20 #define ECKIT_TESTING_SELF_REGISTER_CASES 0
22 #include <boost/noncopyable.hpp>
24 #include "eckit/config/LocalConfiguration.h"
25 #include "eckit/testing/Test.h"
33 #include "oops/util/DateTime.h"
54 return theLocalizationFixture;
70 ~LocalizationFixture<MODEL>() {}
72 std::unique_ptr<const Geometry_>
resol_;
73 std::unique_ptr<const oops::Variables>
ctlvars_;
74 std::unique_ptr<const util::DateTime>
time_;
75 std::unique_ptr<Localization_>
local_;
84 Increment_ dx(Test_::resol(), Test_::ctlvars(), Test_::time());
86 EXPECT(dx.norm() == 0.0);
87 Test_::localization().localize(dx);
88 EXPECT(dx.norm() == 0.0);
97 Increment_ dx(Test_::resol(), Test_::ctlvars(), Test_::time());
100 EXPECT(dx.norm() > 0.0);
101 Test_::localization().localize(dx);
102 EXPECT(dx.norm() > 0.0);
112 std::string
testid()
const override {
return "test::Localization<" + MODEL::name() +
">";}
115 std::vector<eckit::testing::Test>& ts = eckit::testing::specification();
117 ts.emplace_back(
CASE(
"interface/Localization/testLocalizationZero")
118 { testLocalizationZero<MODEL>(); });
119 ts.emplace_back(
CASE(
"interface/Localization/testLocalizationMultiply")
120 { testLocalizationMultiply<MODEL>(); });
130 #endif // TEST_INTERFACE_LOCALIZATION_H_