15TEST(Config, CanDeserializeStdMap)
17 using Map_t = std::map<i32, i32>;
24 YAML::Node node = YAML::Load(ss.str());
27 EXPECT_EQ(map.size(), 3);
28 EXPECT_EQ(map.at(1), 2);
29 EXPECT_EQ(map.at(3), 4);
30 EXPECT_EQ(map.at(5), 6);
33TEST(Config, CanSerializeStdMap)
35 using Map_t = std::map<i32, i32>;
42 YAML::Node node = YAML::Load(
yaml::Dump{}(map));
44 EXPECT_EQ(node.size(), 3);
45 EXPECT_EQ(node[1].as<i32>(), 2);
46 EXPECT_EQ(node[3].as<i32>(), 4);
47 EXPECT_EQ(node[5].as<i32>(), 6);
62TEST(Config, CanAccessPrivateMembers)
68 YAML::Node node = YAML::Load(ss.str());
71 EXPECT_EQ(foo.GetBar(), 1);
72 EXPECT_EQ(foo.GetBaz(), 2);
CBM_YAML_PROPERTIES(yaml::Property(&Foo::fBar, "bar", ""), yaml::Property(&Foo::fBaz, "baz", ""))