| 37 | }; |
| 38 | |
| 39 | TEST(BlockingQueueTest, TestBasic) { |
| 40 | int32_t i; |
| 41 | BlockingQueue<int32_t> test_queue(5); |
| 42 | ASSERT_TRUE(test_queue.BlockingPut(1)); |
| 43 | ASSERT_TRUE(test_queue.BlockingPut(2)); |
| 44 | ASSERT_TRUE(test_queue.BlockingPut(3)); |
| 45 | ASSERT_TRUE(test_queue.BlockingGet(&i)); |
| 46 | ASSERT_EQ(1, i); |
| 47 | ASSERT_TRUE(test_queue.BlockingGet(&i)); |
| 48 | ASSERT_EQ(2, i); |
| 49 | ASSERT_TRUE(test_queue.BlockingGet(&i)); |
| 50 | ASSERT_EQ(3, i); |
| 51 | } |
| 52 | |
| 53 | TEST(BlockingQueueTest, TestGetFromShutdownQueue) { |
| 54 | int64_t i; |
nothing calls this directly
no test coverage detected