MCPcopy Create free account
hub / github.com/apache/mesos / TEST

Function TEST

3rdparty/libprocess/src/tests/rwlock_tests.cpp:22–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20
21
22TEST(ReadWriteLockTest, LockWhenUnlocked)
23{
24 ReadWriteLock lock;
25
26 // We should be able to lock for writing or reading when the
27 // lock is unlocked.
28
29 EXPECT_TRUE(lock.write_lock().isReady());
30 lock.write_unlock();
31
32 EXPECT_TRUE(lock.read_lock().isReady());
33 lock.read_unlock();
34
35 EXPECT_TRUE(lock.write_lock().isReady());
36 lock.write_unlock();
37}
38
39
40TEST(ReadWriteLockTest, BlockReads)

Callers

nothing calls this directly

Calls 6

isReadyMethod · 0.80
write_lockMethod · 0.80
write_unlockMethod · 0.80
read_lockMethod · 0.80
read_unlockMethod · 0.80
isPendingMethod · 0.45

Tested by

no test coverage detected