diff options
author | Nikita Petrenko <npetrenko97@gmail.com> | 2022-02-10 16:50:57 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:50:57 +0300 |
commit | fd3f62e99d2990dd93788742aaf6a9bd5cb4d5a3 (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/threading/future/future_ut.cpp | |
parent | aa72317474c8df5627f69271ae16f4237e5d3612 (diff) | |
download | ydb-fd3f62e99d2990dd93788742aaf6a9bd5cb4d5a3.tar.gz |
Restoring authorship annotation for Nikita Petrenko <npetrenko97@gmail.com>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/threading/future/future_ut.cpp')
-rw-r--r-- | library/cpp/threading/future/future_ut.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/library/cpp/threading/future/future_ut.cpp b/library/cpp/threading/future/future_ut.cpp index b1b1ce796a..05950a568d 100644 --- a/library/cpp/threading/future/future_ut.cpp +++ b/library/cpp/threading/future/future_ut.cpp @@ -236,7 +236,7 @@ namespace { UNIT_ASSERT(!promise.HasValue()); UNIT_ASSERT(promise.HasException()); UNIT_ASSERT_EXCEPTION(promise.GetValue(), TCustomException); - UNIT_ASSERT_EXCEPTION(promise.TryRethrow(), TCustomException); + UNIT_ASSERT_EXCEPTION(promise.TryRethrow(), TCustomException); } Y_UNIT_TEST(ShouldRethrowCallbackException) { @@ -537,22 +537,22 @@ namespace { UNIT_ASSERT(future4.HasValue()); UNIT_CHECK_GENERATED_NO_EXCEPTION(future4.GetValue(), TFutureException); } - - Y_UNIT_TEST(WaitAllowsExtract) { - auto future = MakeFuture<int>(42); - TVector vec{future, future, future}; + + Y_UNIT_TEST(WaitAllowsExtract) { + auto future = MakeFuture<int>(42); + TVector vec{future, future, future}; WaitExceptionOrAll(vec).GetValue(); - WaitAny(vec).GetValue(); - - UNIT_ASSERT_EQUAL(future.ExtractValue(), 42); - } - - Y_UNIT_TEST(IgnoreAllowsExtract) { - auto future = MakeFuture<int>(42); - future.IgnoreResult().GetValue(); - - UNIT_ASSERT_EQUAL(future.ExtractValue(), 42); - } + WaitAny(vec).GetValue(); + + UNIT_ASSERT_EQUAL(future.ExtractValue(), 42); + } + + Y_UNIT_TEST(IgnoreAllowsExtract) { + auto future = MakeFuture<int>(42); + future.IgnoreResult().GetValue(); + + UNIT_ASSERT_EQUAL(future.ExtractValue(), 42); + } Y_UNIT_TEST(WaitExceptionOrAllException) { auto promise1 = NewPromise(); |