MCPcopy Create free account
hub / github.com/boostorg/spirit / test_binary_generator

Function test_binary_generator

example/karma/reference.cpp:85–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83//[reference_karma_binary_test
84template <typename G>
85void test_binary_generator(char const* expected, std::size_t size, G const& g)
86{
87 std::string s;
88 std::back_insert_iterator<std::string> out(s);
89 if (boost::spirit::karma::generate(out, g) && !std::memcmp(s.c_str(), expected, size))
90 std::cout << "ok" << std::endl;
91 else
92 std::cout << "fail" << std::endl;
93}
94//]
95
96//[reference_karma_binary_test_attr

Callers 1

mainFunction · 0.85

Calls 1

generateFunction · 0.70

Tested by

no test coverage detected