| 19 | using process::Mutex; |
| 20 | |
| 21 | TEST(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 | |
| 35 | TEST(MutexTest, Block) |