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

Function main

test/parse_empty.cpp:23–280  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21BOOST_PARSER_DEFINE_RULES(ints);
22
23int main()
24{
25 char const * chars = "";
26 auto first = chars;
27 boost::parser::detail::text::null_sentinel_t last;
28
29 {
30 constexpr auto parser = eps;
31 auto result = prefix_parse(first, last, parser);
32 BOOST_TEST(result);
33 }
34 {
35 constexpr auto parser = eol;
36 auto result = prefix_parse(first, last, parser);
37 BOOST_TEST(!result);
38 }
39 {
40 constexpr auto parser = eoi;
41 auto result = prefix_parse(first, last, parser);
42 BOOST_TEST(result);
43 }
44 {
45 constexpr auto parser = attr(3.0);
46 auto result = prefix_parse(first, last, parser);
47 BOOST_TEST(result);
48 }
49 {
50 constexpr auto parser = attr('c');
51 auto result = prefix_parse(first, last, parser);
52 BOOST_TEST(result);
53 }
54 {
55 constexpr auto parser = cp;
56 auto result = prefix_parse(first, last, parser);
57 BOOST_TEST(!result);
58 }
59 {
60 constexpr auto parser = cu;
61 auto result = prefix_parse(first, last, parser);
62 BOOST_TEST(!result);
63 }
64 {
65 using namespace boost::parser::literals;
66 constexpr auto parser = 'c'_l;
67 auto result = prefix_parse(first, last, parser);
68 BOOST_TEST(!result);
69 }
70 {
71 using namespace boost::parser::literals;
72 constexpr auto parser = u8'c'_l;
73 auto result = prefix_parse(first, last, parser);
74 BOOST_TEST(!result);
75 }
76 {
77 using namespace boost::parser::literals;
78 constexpr auto parser = U'c'_l;
79 auto result = prefix_parse(first, last, parser);
80 BOOST_TEST(!result);

Callers

nothing calls this directly

Calls 6

prefix_parseFunction · 0.85
attrFunction · 0.85
litFunction · 0.85
if_Function · 0.85
switch_Function · 0.85
stringClass · 0.50

Tested by

no test coverage detected