错误处理
This commit is contained in:
@@ -60,18 +60,20 @@ TEST(external_operation_test, completion_before_subscription_is_delivered_once)
|
||||
}
|
||||
|
||||
TEST(external_operation_test,
|
||||
callback_exceptions_are_contained_for_both_completion_orders) {
|
||||
callback_exceptions_propagate_for_both_completion_orders) {
|
||||
External_Operation_Source completed_first;
|
||||
const auto completed_operation = completed_first.operation();
|
||||
ASSERT_TRUE(completed_first.complete());
|
||||
EXPECT_NO_THROW(completed_operation.on_complete(
|
||||
[](External_Operation_Completion) { throw std::runtime_error("late callback"); }));
|
||||
EXPECT_THROW(completed_operation.on_complete(
|
||||
[](External_Operation_Completion) {
|
||||
throw std::runtime_error("late callback");
|
||||
}), std::runtime_error);
|
||||
|
||||
External_Operation_Source subscribed_first;
|
||||
const auto subscribed_operation = subscribed_first.operation();
|
||||
subscribed_operation.on_complete(
|
||||
[](External_Operation_Completion) { throw std::runtime_error("early callback"); });
|
||||
EXPECT_TRUE(subscribed_first.complete());
|
||||
EXPECT_THROW(static_cast<void>(subscribed_first.complete()), std::runtime_error);
|
||||
}
|
||||
|
||||
TEST(render_graph_runtime_test, reusable_topology_executes_multiple_frames) {
|
||||
|
||||
Reference in New Issue
Block a user