MCPcopy Create free account
hub / github.com/davidgiven/fluxengine / test_fields

Function test_fields

tests/proto.cc:144–171  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

142}
143
144static void test_fields(void)
145{
146 TestProto proto;
147 auto fields = findAllPossibleProtoFields(proto.GetDescriptor());
148 std::vector<std::string> fieldNames;
149 for (const auto& e : fields)
150 fieldNames.push_back(e.first);
151
152 AssertThat(fieldNames,
153 Equals(std::vector<std::string>{"d",
154 "f",
155 "firstoption",
156 "firstoption.r[]",
157 "firstoption.s",
158 "i32",
159 "i64",
160 "m",
161 "m.r[]",
162 "m.s",
163 "r[]",
164 "r[].r[]",
165 "r[].s",
166 "secondoption",
167 "secondoption.r[]",
168 "secondoption.s",
169 "u32",
170 "u64"}));
171}
172
173static void test_options(void)
174{

Callers 1

mainFunction · 0.85

Calls 2

push_backMethod · 0.45

Tested by

no test coverage detected