19 #include <gtest/gtest.h> 37 EXPECT_TRUE(c1.
hasField(
"field2/field2_1"));
38 EXPECT_TRUE(c1.
hasField(
"/field2/field2_1"));
40 EXPECT_FALSE(c1.
hasField(
"field2/field2_2"));
42 EXPECT_NO_THROW(c1.
getField(
"field1"));
43 EXPECT_NO_THROW(c1.
getField(
"/field2"));
44 EXPECT_NO_THROW(c1.
getField(
"field2/field2_1"));
45 EXPECT_NO_THROW(c1.
getField(
"/field2/field2_1"));
46 EXPECT_ANY_THROW(c1.
getField(
"field3"));
47 EXPECT_ANY_THROW(c1.
getField(
"field2/field2_2"));
49 EXPECT_FALSE(c1[
"field1"].getValue());
50 EXPECT_TRUE(c1[
"field2"].getValue());
Header file providing the MessageFieldCollection class interface.
TEST(MessageFieldCollection, Namespaces)