MCPcopy Create free account
hub / github.com/baidu/babylon / TEST_F

Function TEST_F

test/coroutine/test_cancelable.cpp:38–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36};
37
38TEST_F(CoroutineCancelableTest, proxy_to_inner_awaitable) {
39 auto future = executor.execute([]() -> CoroutineTask<::std::string> {
40 co_return *co_await Cancellable<CoroutineTask<::std::string>> {
41 []() -> CoroutineTask<::std::string> {
42 co_return "10086";
43 }()};
44 });
45 ASSERT_EQ("10086", future.get());
46}
47
48TEST_F(CoroutineCancelableTest, cancel_before_finish) {
49 ::std::promise<void> promise;

Callers

nothing calls this directly

Calls 13

get_futureMethod · 0.80
set_valueMethod · 0.80
wait_forMethod · 0.80
submitMethod · 0.80
count_downMethod · 0.80
executeMethod · 0.45
getMethod · 0.45
stopMethod · 0.45
startMethod · 0.45
set_executorMethod · 0.45
sizeMethod · 0.45
validMethod · 0.45

Tested by

no test coverage detected