MCPcopy Create free account
hub / github.com/alibaba/async_simple / TEST

Function TEST

async_simple/util/test/ThreadPoolTest.cpp:84–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82}
83
84TEST(ThreadTest, BasicTest) {
85 ThreadPool pool;
86 EXPECT_EQ(std::thread::hardware_concurrency(),
87 static_cast<decltype(std::thread::hardware_concurrency())>(
88 pool.getThreadNum()));
89 ThreadPool pool1(2);
90 EXPECT_EQ(2, pool1.getThreadNum());
91
92 TestBasic(pool);
93
94 ThreadPool tp(std::thread::hardware_concurrency(),
95 /*enableWorkSteal = */ true);
96 TestBasic(tp);
97}
98
99} // namespace async_simple

Callers

nothing calls this directly

Calls 2

TestBasicFunction · 0.85
getThreadNumMethod · 0.80

Tested by

no test coverage detected