10 #include <gtest/gtest.h>
13 #include <fmt/ostream.h>
35 EXPECT_THROW(m_config_manager.Register(&
TestConfig::value0, {}), std::invalid_argument);
42 EXPECT_EQ(val.value, m_config.value0);
44 EXPECT_EQ(val.origin.description,
"");
45 EXPECT_EQ(val.metadata.canonical_name,
"value0");
46 EXPECT_EQ(val.metadata.description,
"description value0");
49 <<
"value1 has not been registered and Get() should throw invalid_argument in that case";
59 EXPECT_EQ(val.value, m_config.value0);
64 m_config_manager.Update(&
TestConfig::value0, 2, {daq::config::Origin::CommandLine,
"args"});
66 EXPECT_EQ(val.value, m_config.value0);
67 EXPECT_EQ(val.origin.origin, daq::config::Origin::CommandLine);
68 EXPECT_EQ(val.origin.description,
"args");
69 EXPECT_EQ(val.metadata.canonical_name,
"value0");
70 EXPECT_EQ(val.metadata.description,
"description value0");