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

Function main

test/on_error_preload_nested_success_result_test.cpp:37–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35}
36
37int main()
38{
39 int r = leaf::try_handle_all(
40 []() -> leaf::result<int>
41 {
42 BOOST_LEAF_CHECK(f());
43 return 1;
44 },
45 []( info x )
46 {
47 BOOST_TEST_EQ(x.value, 2);
48 return 2;
49 },
50 []
51 {
52 return 3;
53 } );
54 BOOST_TEST_EQ(r, 2);
55
56 return boost::report_errors();
57}

Callers

nothing calls this directly

Calls 3

try_handle_allFunction · 0.85
report_errorsFunction · 0.85
fFunction · 0.70

Tested by

no test coverage detected