MCPcopy Create free account
hub / github.com/boostorg/leaf / test3

Function test3

test/github_issue53_test.cpp:46–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44}
45
46void test3(int a)
47{
48 int x = 0;
49 leaf::try_handle_all(
50 [&]() -> leaf::result<void>
51 {
52 BOOST_LEAF_AUTO(val, test2(a));
53 (void) val;
54 return {};
55 },
56 [&](leaf::match<ErrorCode, ErrorCode::E_GENERIC_PARSE>)
57 {
58 x = 1;
59 },
60 [&](ErrorCode e)
61 {
62 x = 2;
63 },
64 [&]()
65 {
66 x = 3;
67 }
68 );
69 BOOST_TEST_EQ(x, 1);
70}
71
72int main()
73{

Callers 1

mainFunction · 0.70

Calls 2

try_handle_allFunction · 0.85
test2Function · 0.70

Tested by

no test coverage detected