diff options
author | kikht <kikht@yandex-team.ru> | 2022-02-10 16:45:14 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:14 +0300 |
commit | 778e51ba091dc39e7b7fcab2b9cf4dbedfb6f2b5 (patch) | |
tree | be835aa92c6248212e705f25388ebafcf84bc7a1 /library/cpp/threading/future/future_ut.cpp | |
parent | 194cae0e8855b11be2005e1eff12c660c3ee9774 (diff) | |
download | ydb-778e51ba091dc39e7b7fcab2b9cf4dbedfb6f2b5.tar.gz |
Restoring authorship annotation for <kikht@yandex-team.ru>. Commit 2 of 2.
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 63fb4604be..05950a568d 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())); |