8 #ifndef TEST_IODA_OBSDTYPE_H_
9 #define TEST_IODA_OBSDTYPE_H_
15 #include <boost/make_unique.hpp>
17 #include "eckit/config/LocalConfiguration.h"
18 #include "eckit/testing/Test.h"
22 #include "oops/test/TestEnvironment.h"
23 #include "oops/util/parameters/Parameters.h"
24 #include "oops/util/parameters/RequiredParameter.h"
26 #include "ioda/core/ParameterTraitsObsDtype.h"
35 oops::RequiredParameter<ioda::ObsDtype>
dtype{
"dtype",
this};
43 params.validateAndDeserialize(conf.getSubConfiguration(
"int"));
48 params.validateAndDeserialize(conf.getSubConfiguration(
"float"));
53 params.validateAndDeserialize(conf.getSubConfiguration(
"string"));
58 params.validateAndDeserialize(conf.getSubConfiguration(
"datetime"));
59 EXPECT(
params.dtype == ObsDtype::DateTime);
63 EXPECT_THROWS(
params.validateAndDeserialize(conf.getSubConfiguration(
"invalid")));
69 std::string
testid()
const override {
return "test::ioda::ObsDtype";}
oops::RequiredParameter< ioda::ObsDtype > dtype
void clear() const override
std::string testid() const override
void register_tests() const override
static const eckit::Configuration & config()
CASE("Derived variable, unit conversion, and exception checking methods")