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

Function test

test/on_error_preload_basic_test.cpp:31–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29
30template <class G>
31void test( G && g )
32{
33 int r = leaf::try_handle_all(
34 [&]() -> leaf::result<int>
35 {
36 return f(std::move(g));
37 },
38 []( info<42> const & i42, leaf::diagnostic_info const & di )
39 {
40 BOOST_TEST_EQ(i42.value, 42);
41 return 1;
42 },
43 []
44 {
45 return 2;
46 } );
47 BOOST_TEST_EQ(r, 1);
48}
49
50int main()
51{

Callers 1

mainFunction · 0.70

Calls 2

try_handle_allFunction · 0.85
fFunction · 0.70

Tested by

no test coverage detected