| 44 | } |
| 45 | |
| 46 | void 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 | |
| 72 | int main() |
| 73 | { |
no test coverage detected