Lines Matching refs:queue
52 TestMessageQueue queue; in TEST_F() local
54 queue.SendMessage(EmptyMessage{}); in TEST_F()
55 ASSERT_TRUE(std::holds_alternative<EmptyMessage>(queue.ReceiveMessage())); in TEST_F()
57 queue.SendMessage(IntMessage{42}); in TEST_F()
58 ASSERT_TRUE(std::holds_alternative<IntMessage>(queue.ReceiveMessage())); in TEST_F()
60 queue.SendMessage(OtherIntMessage{43}); in TEST_F()
61 ASSERT_TRUE(std::holds_alternative<OtherIntMessage>(queue.ReceiveMessage())); in TEST_F()
63 queue.SendMessage(TwoIntMessage{1, 2}); in TEST_F()
64 ASSERT_TRUE(std::holds_alternative<TwoIntMessage>(queue.ReceiveMessage())); in TEST_F()
66 queue.SendMessage(StringMessage{"Hello, World!"}); in TEST_F()
67 ASSERT_TRUE(std::holds_alternative<StringMessage>(queue.ReceiveMessage())); in TEST_F()
71 TestMessageQueue queue; in TEST_F() local
76 queue.SetTimeout(kDuration); in TEST_F()
77 ASSERT_TRUE(std::holds_alternative<TimeoutExpiredMessage>(queue.ReceiveMessage())); in TEST_F()
102 TestMessageQueue queue; in TEST_F() local
104 queue.SendMessage(EmptyMessage{}); in TEST_F()
105 queue.SendMessage(IntMessage{42}); in TEST_F()
106 queue.SendMessage(OtherIntMessage{43}); in TEST_F()
107 queue.SendMessage(TwoIntMessage{1, 2}); in TEST_F()
108 queue.SendMessage(StringMessage{"Hello, World!"}); in TEST_F()
109 queue.SetTimeout(500); in TEST_F()
120 queue.SwitchReceive( in TEST_F()
159 TestMessageQueue queue; in TEST_F() local
161 queue.SendMessage(EmptyMessage{}); in TEST_F()
162 queue.SendMessage(IntMessage{42}); in TEST_F()
163 queue.SendMessage(OtherIntMessage{43}); in TEST_F()
164 queue.SendMessage(TwoIntMessage{1, 2}); in TEST_F()
165 queue.SendMessage(StringMessage{"Hello, World!"}); in TEST_F()
166 queue.SetTimeout(500); in TEST_F()
171 queue.SwitchReceive([&]([[maybe_unused]] auto message) { pending_messages--; }); in TEST_F()
176 TestMessageQueue queue; in TEST_F() local
178 queue.SendMessage(EmptyMessage{}); in TEST_F()
179 queue.SendMessage(IntMessage{42}); in TEST_F()
180 queue.SendMessage(OtherIntMessage{43}); in TEST_F()
181 queue.SendMessage(TwoIntMessage{1, 2}); in TEST_F()
182 queue.SendMessage(StringMessage{"Hello, World!"}); in TEST_F()
183 queue.SetTimeout(500); in TEST_F()
187 queue.SwitchReceive( in TEST_F()
200 TestMessageQueue queue; in TEST_F() local
202 queue.SendMessage(EmptyMessage{}); in TEST_F()
205 queue.SwitchReceive<bool>([&]([[maybe_unused]] const EmptyMessage& message) { return true; }, in TEST_F()
208 queue.SendMessage(IntMessage{42}); in TEST_F()
211 queue.SwitchReceive<bool>([&]([[maybe_unused]] const EmptyMessage& message) { return true; }, in TEST_F()
216 TestMessageQueue queue; in TEST_F() local
228 queue.SendMessage(message); in TEST_F()
230 queue.SetTimeout(500); in TEST_F()
237 auto message = queue.ReceiveMessage(); in TEST_F()
249 ASSERT_TRUE(std::holds_alternative<TimeoutExpiredMessage>(queue.ReceiveMessage())); in TEST_F()