MCPcopy Create free account
hub / github.com/3rdparty/libprocess / TEST

Function TEST

src/tests/mutex_tests.cpp:21–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19using process::Mutex;
20
21TEST(MutexTest, Lock)
22{
23 Mutex mutex;
24
25 // We should be able to acquire the mutex immediately.
26 EXPECT_TRUE(mutex.lock().isReady());
27
28 // After unlocking, we should be able to acquire the mutex
29 // immediately again.
30 mutex.unlock();
31 EXPECT_TRUE(mutex.lock().isReady());
32}
33
34
35TEST(MutexTest, Block)

Callers

nothing calls this directly

Calls 4

isReadyMethod · 0.80
lockMethod · 0.80
unlockMethod · 0.80
isPendingMethod · 0.80

Tested by

no test coverage detected