diff options
Diffstat (limited to 'library/cpp/threading/future/future_ut.cpp')
| -rw-r--r-- | library/cpp/threading/future/future_ut.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/library/cpp/threading/future/future_ut.cpp b/library/cpp/threading/future/future_ut.cpp index 63fb4604be3..05950a568d4 100644 --- a/library/cpp/threading/future/future_ut.cpp +++ b/library/cpp/threading/future/future_ut.cpp @@ -507,18 +507,18 @@ namespace { UNIT_ASSERT(!promise.TrySetValue(42)); } - Y_UNIT_TEST(HandlingRepetitiveSetException) { - TPromise<int> promise = NewPromise<int>(); - promise.SetException("test"); - UNIT_CHECK_GENERATED_EXCEPTION(promise.SetException("test"), TFutureException); - } - - Y_UNIT_TEST(HandlingRepetitiveTrySetException) { - TPromise<int> promise = NewPromise<int>(); - UNIT_ASSERT(promise.TrySetException(std::make_exception_ptr("test"))); - UNIT_ASSERT(!promise.TrySetException(std::make_exception_ptr("test"))); - } - + Y_UNIT_TEST(HandlingRepetitiveSetException) { + TPromise<int> promise = NewPromise<int>(); + promise.SetException("test"); + UNIT_CHECK_GENERATED_EXCEPTION(promise.SetException("test"), TFutureException); + } + + Y_UNIT_TEST(HandlingRepetitiveTrySetException) { + TPromise<int> promise = NewPromise<int>(); + UNIT_ASSERT(promise.TrySetException(std::make_exception_ptr("test"))); + UNIT_ASSERT(!promise.TrySetException(std::make_exception_ptr("test"))); + } + Y_UNIT_TEST(ShouldAllowToMakeFutureWithException) { auto future1 = MakeErrorFuture<void>(std::make_exception_ptr(TFutureException())); |
