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

Function github_issue_50

test/github_issues.cpp:82–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80}
81
82void github_issue_50()
83{
84 using namespace issue_50;
85
86 namespace bp = boost::parser;
87
88 {
89 auto parse_x = bp::char_ >> bp::int_;
90 auto parse_y = +parse_x >> bp::int_;
91
92 Y y;
93 auto b = bp::parse("d 3 4", parse_y, bp::ws, y);
94 BOOST_TEST(b);
95
96 BOOST_TEST(y.x[0].a == 'd');
97 BOOST_TEST(y.x[0].b == 3);
98 BOOST_TEST(y.c == 4);
99 }
100
101 {
102 auto parse_x = bp::char_ >> bp::int_;
103 auto parse_y = +parse_x >> bp::int_;
104
105 Y2 y;
106 auto b = bp::parse("d 3 4", parse_y, bp::ws, y);
107 BOOST_TEST(b);
108
109 BOOST_TEST(y.x.begin()->a == 'd');
110 BOOST_TEST(y.x.begin()->b == 3);
111 BOOST_TEST(y.c == 4);
112 }
113}
114
115namespace issue_52 {
116 struct X

Callers 1

mainFunction · 0.85

Calls 2

parseFunction · 0.50
beginMethod · 0.45

Tested by

no test coverage detected