mirror of
https://github.com/Naios/continuable.git
synced 2026-10-28 18:07:24 +08:00
Cleanup the unit tests
This commit is contained in:
parent
c5663bf1ad
commit
82dd47b463
@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user