Cleanup the unit tests

This commit is contained in:
Denis Blank 2018-11-26 03:21:01 +01:00
parent c5663bf1ad
commit 82dd47b463

View File

@ -121,10 +121,6 @@ TYPED_TEST(single_dimension_tests, multipath_exception_is_cancelable) {
.fail([](exception_t) -> empty_result { .fail([](exception_t) -> empty_result {
// //
return cancel(); return cancel();
})
.fail([] {
//
FAIL();
})); }));
ASSERT_ASYNC_INCOMPLETION( ASSERT_ASYNC_INCOMPLETION(
@ -132,27 +128,15 @@ TYPED_TEST(single_dimension_tests, multipath_exception_is_cancelable) {
.fail([](exception_t) -> result<int> { .fail([](exception_t) -> result<int> {
// //
return cancel(); return cancel();
})
.fail([] {
//
FAIL();
})); }));
} }
TYPED_TEST(single_dimension_tests, multipath_exception_is_autocanceled) { TYPED_TEST(single_dimension_tests, multipath_exception_is_autocanceled) {
bool caught = false; bool caught = false;
ASSERT_ASYNC_INCOMPLETION(this->supply_exception(supply_test_exception()) ASSERT_ASYNC_INCOMPLETION(
.fail([&](exception_t) { this->supply_exception(supply_test_exception()).fail([&](exception_t) {
EXPECT_FALSE(caught); EXPECT_FALSE(caught);
caught = true; caught = true;
}) }));
.then([] {
// ...
FAIL();
})
.fail([](exception_t) {
// ...
FAIL();
}));
ASSERT_TRUE(caught); ASSERT_TRUE(caught);
} }