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

Function github_issue_52

test/github_issues.cpp:141–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

139}
140
141void github_issue_52()
142{
143 using namespace issue_52;
144
145 namespace bp = boost::parser;
146 auto parse_x = bp::char_ >> bp::int_;
147 auto parse_y = +parse_x >> bp::int_;
148 auto parse_z = +parse_y >> bp::char_;
149 auto parse_w = +parse_z >> bp::int_;
150
151 {
152 Z z;
153 auto b = bp::parse("d 2 3 c", parse_z, bp::ws, z);
154 BOOST_TEST(b);
155
156 BOOST_TEST(z.y[0].x[0].a == 'd');
157 BOOST_TEST(z.y[0].x[0].b == 2);
158 BOOST_TEST(z.y[0].c == 3);
159 BOOST_TEST(z.d == 'c');
160 }
161 {
162 W w;
163 auto b = bp::parse("d 2 3 c 4", parse_w, bp::ws, w);
164 BOOST_TEST(b);
165
166 BOOST_TEST(w.z[0].y[0].x[0].a == 'd');
167 BOOST_TEST(w.z[0].y[0].x[0].b == 2);
168 BOOST_TEST(w.z[0].y[0].c == 3);
169 BOOST_TEST(w.z[0].d == 'c');
170 BOOST_TEST(w.e == 4);
171 }
172}
173
174void github_issue_78()
175{

Callers 1

mainFunction · 0.85

Calls 1

parseFunction · 0.50

Tested by

no test coverage detected