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

Function github_issue_125

test/github_issues.cpp:212–238  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

210}
211
212void github_issue_125()
213{
214 namespace bp = boost::parser;
215 using namespace github_issue_125_;
216
217 unsigned short integer_found = 99;
218 auto print_repl_field = [&](auto & ctx) {
219 const std::optional<unsigned short> & val = bp::_attr(ctx);
220 if (val)
221 integer_found = *val;
222 else
223 integer_found = 77;
224 };
225
226 {
227 integer_found = 99;
228 auto result = bp::parse("{9", replacement_field[print_repl_field]);
229 BOOST_TEST(result);
230 BOOST_TEST(integer_found == 9);
231 }
232 {
233 integer_found = 99;
234 auto result = bp::parse("{", replacement_field[print_repl_field]);
235 BOOST_TEST(result);
236 BOOST_TEST(integer_found == 77);
237 }
238}
239
240void github_issue_209()
241{

Callers 1

mainFunction · 0.85

Calls 2

_attrFunction · 0.85
parseFunction · 0.50

Tested by

no test coverage detected