diff options
author | yazevnul <yazevnul@yandex-team.ru> | 2022-02-10 16:46:48 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:48 +0300 |
commit | 9abfb1a53b7f7b791444d1378e645d8fad9b06ed (patch) | |
tree | 49e222ea1c5804306084bb3ae065bb702625360f /library/cpp/threading/future/future_ut.cpp | |
parent | 8cbc307de0221f84c80c42dcbe07d40727537e2c (diff) | |
download | ydb-9abfb1a53b7f7b791444d1378e645d8fad9b06ed.tar.gz |
Restoring authorship annotation for <yazevnul@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 | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/library/cpp/threading/future/future_ut.cpp b/library/cpp/threading/future/future_ut.cpp index f45fc84e23..05950a568d 100644 --- a/library/cpp/threading/future/future_ut.cpp +++ b/library/cpp/threading/future/future_ut.cpp @@ -64,8 +64,8 @@ namespace { //////////////////////////////////////////////////////////////////////////////// - Y_UNIT_TEST_SUITE(TFutureTest) { - Y_UNIT_TEST(ShouldInitiallyHasNoValue) { + Y_UNIT_TEST_SUITE(TFutureTest) { + Y_UNIT_TEST(ShouldInitiallyHasNoValue) { TPromise<int> promise; UNIT_ASSERT(!promise.HasValue()); @@ -79,7 +79,7 @@ namespace { UNIT_ASSERT(!future.HasValue()); } - Y_UNIT_TEST(ShouldInitiallyHasNoValueVoid) { + Y_UNIT_TEST(ShouldInitiallyHasNoValueVoid) { TPromise<void> promise; UNIT_ASSERT(!promise.HasValue()); @@ -93,7 +93,7 @@ namespace { UNIT_ASSERT(!future.HasValue()); } - Y_UNIT_TEST(ShouldStoreValue) { + Y_UNIT_TEST(ShouldStoreValue) { TPromise<int> promise = NewPromise<int>(); promise.SetValue(123); UNIT_ASSERT(promise.HasValue()); @@ -108,7 +108,7 @@ namespace { UNIT_ASSERT_EQUAL(future.GetValue(), 345); } - Y_UNIT_TEST(ShouldStoreValueVoid) { + Y_UNIT_TEST(ShouldStoreValueVoid) { TPromise<void> promise = NewPromise(); promise.SetValue(); UNIT_ASSERT(promise.HasValue()); @@ -151,7 +151,7 @@ namespace { } }; - Y_UNIT_TEST(ShouldInvokeCallback) { + Y_UNIT_TEST(ShouldInvokeCallback) { TPromise<int> promise = NewPromise<int>(); TTestCallback callback(123); @@ -163,7 +163,7 @@ namespace { UNIT_ASSERT_EQUAL(callback.Value, 123 + 456); } - Y_UNIT_TEST(ShouldApplyFunc) { + Y_UNIT_TEST(ShouldApplyFunc) { TPromise<int> promise = NewPromise<int>(); TTestCallback callback(123); @@ -175,7 +175,7 @@ namespace { UNIT_ASSERT_EQUAL(callback.Value, 123 + 456); } - Y_UNIT_TEST(ShouldApplyVoidFunc) { + Y_UNIT_TEST(ShouldApplyVoidFunc) { TPromise<int> promise = NewPromise<int>(); TTestCallback callback(123); @@ -186,7 +186,7 @@ namespace { UNIT_ASSERT(future.HasValue()); } - Y_UNIT_TEST(ShouldApplyFutureFunc) { + Y_UNIT_TEST(ShouldApplyFutureFunc) { TPromise<int> promise = NewPromise<int>(); TTestCallback callback(123); @@ -198,7 +198,7 @@ namespace { UNIT_ASSERT_EQUAL(callback.Value, 123 + 456); } - Y_UNIT_TEST(ShouldApplyFutureVoidFunc) { + Y_UNIT_TEST(ShouldApplyFutureVoidFunc) { TPromise<int> promise = NewPromise<int>(); TTestCallback callback(123); @@ -212,7 +212,7 @@ namespace { UNIT_ASSERT(future.HasValue()); } - Y_UNIT_TEST(ShouldIgnoreResultIfAsked) { + Y_UNIT_TEST(ShouldIgnoreResultIfAsked) { TPromise<int> promise = NewPromise<int>(); TTestCallback callback(123); @@ -225,7 +225,7 @@ namespace { class TCustomException: public yexception { }; - Y_UNIT_TEST(ShouldRethrowException) { + Y_UNIT_TEST(ShouldRethrowException) { TPromise<int> promise = NewPromise<int>(); try { ythrow TCustomException(); @@ -335,7 +335,7 @@ namespace { UNIT_ASSERT(future.HasValue()); } - Y_UNIT_TEST(ShouldWaitAnyVector) { + Y_UNIT_TEST(ShouldWaitAnyVector) { TPromise<void> promise1 = NewPromise(); TPromise<void> promise2 = NewPromise(); @@ -372,7 +372,7 @@ namespace { UNIT_ASSERT(future.HasValue()); } - Y_UNIT_TEST(ShouldWaitAnyList) { + Y_UNIT_TEST(ShouldWaitAnyList) { TPromise<void> promise1 = NewPromise(); TPromise<void> promise2 = NewPromise(); @@ -390,14 +390,14 @@ namespace { UNIT_ASSERT(future.HasValue()); } - Y_UNIT_TEST(ShouldWaitAnyVectorEmpty) { + Y_UNIT_TEST(ShouldWaitAnyVectorEmpty) { TVector<TFuture<void>> promises; TFuture<void> future = WaitAny(promises); UNIT_ASSERT(future.HasValue()); } - Y_UNIT_TEST(ShouldWaitAny) { + Y_UNIT_TEST(ShouldWaitAny) { TPromise<void> promise1 = NewPromise(); TPromise<void> promise2 = NewPromise(); @@ -411,7 +411,7 @@ namespace { UNIT_ASSERT(future.HasValue()); } - Y_UNIT_TEST(ShouldStoreTypesWithoutDefaultConstructor) { + Y_UNIT_TEST(ShouldStoreTypesWithoutDefaultConstructor) { // compileability test struct TRec { explicit TRec(int) { @@ -426,7 +426,7 @@ namespace { Y_UNUSED(rec); } - Y_UNIT_TEST(ShouldStoreMovableTypes) { + Y_UNIT_TEST(ShouldStoreMovableTypes) { // compileability test struct TRec : TMoveOnly { explicit TRec(int) { @@ -441,7 +441,7 @@ namespace { Y_UNUSED(rec); } - Y_UNIT_TEST(ShouldMoveMovableTypes) { + Y_UNIT_TEST(ShouldMoveMovableTypes) { // compileability test struct TRec : TMoveOnly { explicit TRec(int) { @@ -456,7 +456,7 @@ namespace { Y_UNUSED(rec); } - Y_UNIT_TEST(ShouldNotExtractAfterGet) { + Y_UNIT_TEST(ShouldNotExtractAfterGet) { TPromise<int> promise = NewPromise<int>(); promise.SetValue(123); UNIT_ASSERT(promise.HasValue()); @@ -464,7 +464,7 @@ namespace { UNIT_CHECK_GENERATED_EXCEPTION(promise.ExtractValue(), TFutureException); } - Y_UNIT_TEST(ShouldNotGetAfterExtract) { + Y_UNIT_TEST(ShouldNotGetAfterExtract) { TPromise<int> promise = NewPromise<int>(); promise.SetValue(123); UNIT_ASSERT(promise.HasValue()); @@ -472,7 +472,7 @@ namespace { UNIT_CHECK_GENERATED_EXCEPTION(promise.GetValue(), TFutureException); } - Y_UNIT_TEST(ShouldNotExtractAfterExtract) { + Y_UNIT_TEST(ShouldNotExtractAfterExtract) { TPromise<int> promise = NewPromise<int>(); promise.SetValue(123); UNIT_ASSERT(promise.HasValue()); |