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

Function TEST_F

async_simple/coro/test/SharedMutexTest.cpp:41–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39};
40
41TEST_F(SharedMutexTest, testTryLock) {
42 SharedMutex m;
43 EXPECT_TRUE(m.tryLock());
44 EXPECT_FALSE(m.tryLock());
45 syncAwait(m.unlock());
46 EXPECT_TRUE(m.tryLock());
47 syncAwait(m.unlock());
48}
49
50TEST_F(SharedMutexTest, testTryLockShared) {
51 SharedMutex m;

Callers

nothing calls this directly

Calls 15

syncAwaitFunction · 0.85
collectAllParaFunction · 0.85
fFunction · 0.85
tryLockSharedMethod · 0.80
unlockSharedMethod · 0.80
insertMethod · 0.80
eraseMethod · 0.80
coLockSharedMethod · 0.80
viaMethod · 0.80
tryLockMethod · 0.45
unlockMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected