MCPcopy Create free account
hub / github.com/OpenDDS/OpenDDS / Test

Function Test

tests/DCPS/TopicExpression/TopicExpression.cpp:21–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19
20 template<typename Rule_T>
21 bool Test(const char* in, void (*callback)(yard::SimpleTextParser&) = 0)
22 {
23 const char* out = in + std::strlen(in);
24 yard::SimpleTextParser parser(in, out);
25 const bool pass = parser.Parse<yard::Seq<Rule_T, yard::EndOfInput> >();
26 std::printf("%s test for rule %s, on input %s\n",
27 pass ? "passed" : "FAILED", typeid(Rule_T).name(), in);
28 if (pass && callback) callback(parser);
29 return pass;
30 }
31}
32
33typedef yard::TreeBuildingParser<char>::Node Node;

Callers

nothing calls this directly

Calls 2

callbackFunction · 0.70
nameMethod · 0.45

Tested by

no test coverage detected