12 #include "ioda/testconfig.h"
18 #include "eckit/testing/Test.h"
20 using namespace eckit::testing;
25 CASE(
"Derived variable, unit conversion, and exception checking methods") {
34 EXPECT_NOT(dataLayoutPolicy.
isMapped(
"anyVariable"));
35 EXPECT_THROWS(dataLayoutPolicy.
getUnit(
"anyVariable"));
37 EXPECT_NOT(dataLayoutPolicy.
isMapOutput(
"anyVariable"));
40 CASE(
"Generate variants") {
41 detail::DataLayoutPolicy::generate(
"ObsGroup");
42 detail::DataLayoutPolicy::generate(detail::DataLayoutPolicy::Policies::ObsGroup);
44 EXPECT_THROWS(detail::DataLayoutPolicy::generate(
"ObsGroup", str));
45 EXPECT_THROWS(detail::DataLayoutPolicy::generate(detail::DataLayoutPolicy::Policies::ObsGroup,
47 EXPECT_THROWS(detail::DataLayoutPolicy::generate(detail::DataLayoutPolicy::Policies::None, str));
53 int main(
int argc,
char** argv) {
54 return run_tests(argc, argv);
Contains definitions for how data are arranged in ioda internally.
Layout for ObsGroup-like data.
virtual size_t getComplementaryPosition(const std::string &) const
virtual std::type_index getOutputVariableDataType(const std::string &) const
virtual std::pair< bool, std::string > getUnit(const std::string &) const
virtual MergeMethod getMergeMethod(const std::string &) const
virtual bool isComplementary(const std::string &) const
Check if the named variable will be a part of a derived variable.
virtual bool isMapped(const std::string &) const
Check if the named variable is in the Variables section of the ODB mapping file.
virtual std::string getOutputNameFromComponent(const std::string &) const
virtual size_t getInputsNeeded(const std::string &) const
virtual bool isMapOutput(const std::string &) const
Check if the named variable matches one of the output (ioda) names.
int main(int argc, char **argv)