MCPcopy Create free account
hub / github.com/boostorg/parser / github_issue_248

Function github_issue_248

test/github_issues.cpp:309–345  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

307}
308
309void github_issue_248()
310{
311 namespace bp = boost::parser;
312
313 using namespace github_issue_248_;
314
315 {
316 auto const result = bp::parse("//1,2,3", working, bp::ws);
317 auto const expected = std::vector<int>{0, 1, 2, 3};
318 BOOST_TEST(result.has_value());
319 bool const equal = std::equal(
320 result->begin(), result->end(), expected.begin(), expected.end());
321 BOOST_TEST(equal);
322 if (!equal) {
323 std::cout << "contents of *result:\n";
324 for (auto x : *result) {
325 std::cout << x << '\n';
326 }
327 std::cout << '\n';
328 }
329 }
330 {
331 auto const result = bp::parse("//1,2,3", failing, bp::ws);
332 auto const expected = std::vector<int>{0, 1, 2, 3};
333 BOOST_TEST(result.has_value());
334 bool const equal = std::equal(
335 result->begin(), result->end(), expected.begin(), expected.end());
336 BOOST_TEST(equal);
337 if (!equal) {
338 std::cout << "contents of *result:\n";
339 for (auto x : *result) {
340 std::cout << x << '\n';
341 }
342 std::cout << '\n';
343 }
344 }
345}
346
347#if BOOST_PARSER_USE_CONCEPTS
348namespace github_issue_268_ {

Callers 1

mainFunction · 0.85

Calls 4

equalFunction · 0.85
parseFunction · 0.50
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected