MCPcopy Create free account
hub / github.com/catboost/catboost / Y_UNIT_TEST

Function Y_UNIT_TEST

library/cpp/threading/future/future_ut.cpp:68–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66
67 Y_UNIT_TEST_SUITE(TFutureTest) {
68 Y_UNIT_TEST(ShouldInitiallyHasNoValue) {
69 TPromise<int> promise;
70 UNIT_ASSERT(!promise.HasValue());
71
72 promise = NewPromise<int>();
73 UNIT_ASSERT(!promise.HasValue());
74
75 TFuture<int> future;
76 UNIT_ASSERT(!future.HasValue());
77
78 future = promise.GetFuture();
79 UNIT_ASSERT(!future.HasValue());
80 }
81
82 Y_UNIT_TEST(ShouldInitiallyHasNoValueVoid) {
83 TPromise<void> promise;

Callers

nothing calls this directly

Calls 15

NewPromiseFunction · 0.85
MakeFutureFunction · 0.85
TCustomExceptionClass · 0.85
Y_UNUSEDFunction · 0.85
CallbackMethod · 0.80
VoidFuncMethod · 0.80
FutureFuncMethod · 0.80
FutureVoidFuncMethod · 0.80
GetValueSyncMethod · 0.80
ExtractValueSyncMethod · 0.80
TRecClass · 0.70
WaitExceptionOrAllFunction · 0.50

Tested by

no test coverage detected