• Home
  • Raw
  • Download

Lines Matching full:queue

25 // Queue item verification function for the vector test.
30 // Queue item verifier for the vector test.
47 SwapQueue<std::vector<int>> queue(2, i); in TEST() local
49 EXPECT_TRUE(queue.Insert(&i)); in TEST()
51 EXPECT_TRUE(queue.Insert(&i)); in TEST()
53 EXPECT_TRUE(queue.Remove(&i)); in TEST()
55 EXPECT_TRUE(queue.Remove(&i)); in TEST()
60 SwapQueue<int> queue(2); in TEST() local
62 // Fill the queue. in TEST()
64 EXPECT_TRUE(queue.Insert(&i)); in TEST()
66 EXPECT_TRUE(queue.Insert(&i)); in TEST()
69 // on a full queue. in TEST()
71 EXPECT_FALSE(queue.Insert(&i)); in TEST()
74 // Ensure that the Insert didn't overwrite anything in the queue. in TEST()
75 EXPECT_TRUE(queue.Remove(&i)); in TEST()
77 EXPECT_TRUE(queue.Remove(&i)); in TEST()
82 SwapQueue<int> queue(2); in TEST() local
84 EXPECT_FALSE(queue.Remove(&i)); in TEST()
85 EXPECT_TRUE(queue.Insert(&i)); in TEST()
86 EXPECT_TRUE(queue.Remove(&i)); in TEST()
87 EXPECT_FALSE(queue.Remove(&i)); in TEST()
91 SwapQueue<int> queue(2); in TEST() local
94 // Fill the queue. in TEST()
95 EXPECT_TRUE(queue.Insert(&i)); in TEST()
96 EXPECT_TRUE(queue.Insert(&i)); in TEST()
98 // Ensure full queue. in TEST()
99 EXPECT_FALSE(queue.Insert(&i)); in TEST()
101 // Empty the queue. in TEST()
102 queue.Clear(); in TEST()
104 // Ensure that the queue is empty in TEST()
105 EXPECT_FALSE(queue.Remove(&i)); in TEST()
107 // Ensure that the queue is no longer full. in TEST()
108 EXPECT_TRUE(queue.Insert(&i)); in TEST()
115 queue(2, template_element); in TEST() local
118 EXPECT_TRUE(queue.Insert(&valid_chunk)); in TEST()
120 EXPECT_TRUE(queue.Remove(&valid_chunk)); in TEST()
127 SwapQueue<std::vector<int>, LengthVerifierFunctor> queue(2, template_element, in TEST() local
131 EXPECT_TRUE(queue.Insert(&valid_chunk)); in TEST()
133 EXPECT_TRUE(queue.Remove(&valid_chunk)); in TEST()
139 // Queue item verifier for the test. in TEST()
141 SwapQueue<int, decltype(minus_2_verifier)> queue(2, minus_2_verifier); in TEST() local
145 EXPECT_TRUE(queue.Insert(&valid_value)); in TEST()
146 EXPECT_TRUE(queue.Remove(&valid_value)); in TEST()
148 EXPECT_DEATH(result = queue.Insert(&invalid_value), ""); in TEST()
155 queue(2, template_element); in TEST() local
158 EXPECT_DEATH(result = queue.Insert(&invalid_chunk), ""); in TEST()
165 queue(2, template_element); in TEST() local
168 EXPECT_TRUE(queue.Insert(&valid_chunk)); in TEST()
171 EXPECT_DEATH(result = queue.Remove(&invalid_chunk), ""); in TEST()
181 SwapQueue<std::vector<int16_t>> queue(kQueueSize, in TEST() local
194 EXPECT_TRUE(queue.Insert(&buffer_writer)); in TEST()
198 EXPECT_TRUE(queue.Remove(&buffer_reader)); in TEST()
207 SwapQueue<int> queue(0); in TEST() local
209 EXPECT_FALSE(queue.Insert(&i)); in TEST()
210 EXPECT_FALSE(queue.Remove(&i)); in TEST()
215 SwapQueue<int> queue(1); in TEST() local
217 EXPECT_TRUE(queue.Insert(&i)); in TEST()
219 EXPECT_FALSE(queue.Insert(&i)); in TEST()
221 EXPECT_TRUE(queue.Remove(&i)); in TEST()
223 EXPECT_FALSE(queue.Remove(&i)); in TEST()