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

Function TEST_F

test/coroutine/test_task.cpp:108–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106size_t CoroutineTest::destroy_times {0};
107
108TEST_F(CoroutineTest, default_destroy_with_task) {
109 using S = P<int>;
110 {
111 auto task = [](S) -> CoroutineTask<> {
112 co_return;
113 }(S {new int});
114 ASSERT_EQ(0, destroy_times);
115 }
116 ASSERT_EQ(1, destroy_times);
117}
118
119TEST_F(CoroutineTest, task_detach_coroutine_after_submit) {
120 using S = P<::std::future<void>>;

Callers

nothing calls this directly

Calls 10

get_futureMethod · 0.80
wait_forMethod · 0.80
set_valueMethod · 0.80
set_worker_numberMethod · 0.80
set_local_capacityMethod · 0.80
getMethod · 0.45
executeMethod · 0.45
stopMethod · 0.45
startMethod · 0.45
set_executorMethod · 0.45

Tested by

no test coverage detected