Lines Matching refs:bfd
98 BufferedFrameDeserializer bfd; in TEST() local
101 BufferedFrameDeserializer::ReceiveBuffer rbuf = bfd.BeginReceive(); in TEST()
106 ASSERT_TRUE(bfd.EndReceive(frame.size())); in TEST()
109 auto decoded_frame = bfd.PopNextFrame(); in TEST()
113 ASSERT_FALSE(bfd.PopNextFrame()); in TEST()
114 ASSERT_EQ(0u, bfd.size()); in TEST()
125 BufferedFrameDeserializer bfd; in TEST() local
146 BufferedFrameDeserializer::ReceiveBuffer rbuf = bfd.BeginReceive(); in TEST()
149 ASSERT_TRUE(bfd.EndReceive(simple_frame.size() + frame_chunk1.size())); in TEST()
153 rbuf = bfd.BeginReceive(); in TEST()
155 ASSERT_TRUE(bfd.EndReceive(frame_chunk2.size())); in TEST()
159 rbuf = bfd.BeginReceive(); in TEST()
161 ASSERT_TRUE(bfd.EndReceive(frame_chunk3.size())); in TEST()
164 std::unique_ptr<Frame> decoded_simple_frame = bfd.PopNextFrame(); in TEST()
169 std::unique_ptr<Frame> decoded_frame = bfd.PopNextFrame(); in TEST()
176 BufferedFrameDeserializer bfd; in TEST() local
181 BufferedFrameDeserializer::ReceiveBuffer rbuf = bfd.BeginReceive(); in TEST()
183 ASSERT_TRUE(bfd.EndReceive(frame_chunk1.size())); in TEST()
185 rbuf = bfd.BeginReceive(); in TEST()
186 ASSERT_TRUE(bfd.EndReceive(0)); in TEST()
188 rbuf = bfd.BeginReceive(); in TEST()
190 ASSERT_TRUE(bfd.EndReceive(frame_chunk2.size())); in TEST()
193 std::unique_ptr<Frame> decoded_frame = bfd.PopNextFrame(); in TEST()
196 ASSERT_FALSE(bfd.PopNextFrame()); in TEST()
197 ASSERT_EQ(0u, bfd.size()); in TEST()
203 BufferedFrameDeserializer bfd; in TEST() local
206 BufferedFrameDeserializer::ReceiveBuffer rbuf = bfd.BeginReceive(); in TEST()
209 ASSERT_TRUE(bfd.EndReceive(kHeaderSize)); in TEST()
211 rbuf = bfd.BeginReceive(); in TEST()
213 ASSERT_TRUE(bfd.EndReceive(frame.size())); in TEST()
216 std::unique_ptr<Frame> decoded_frame = bfd.PopNextFrame(); in TEST()
219 ASSERT_FALSE(bfd.PopNextFrame()); in TEST()
225 BufferedFrameDeserializer bfd; in TEST() local
230 BufferedFrameDeserializer::ReceiveBuffer rbuf = bfd.BeginReceive(); in TEST()
237 ASSERT_TRUE(bfd.EndReceive(frame_offset_in_batch)); in TEST()
239 auto frame = bfd.PopNextFrame(); in TEST()
244 ASSERT_FALSE(bfd.PopNextFrame()); in TEST()
245 ASSERT_EQ(0u, bfd.size()); in TEST()
250 BufferedFrameDeserializer bfd; in TEST() local
251 BufferedFrameDeserializer::ReceiveBuffer rbuf = bfd.BeginReceive(); in TEST()
255 ASSERT_FALSE(bfd.EndReceive(kHeaderSize + 20)); in TEST()
262 BufferedFrameDeserializer bfd; in TEST() local
266 BufferedFrameDeserializer::ReceiveBuffer rbuf = bfd.BeginReceive(); in TEST()
270 ASSERT_TRUE(bfd.EndReceive(1)); in TEST()
272 ASSERT_FALSE(bfd.PopNextFrame()) << off << "/" << frame.size(); in TEST()
273 ASSERT_EQ(off + 1, bfd.size()); in TEST()
275 ASSERT_TRUE(bfd.PopNextFrame()); in TEST()
285 BufferedFrameDeserializer bfd; in TEST() local
293 BufferedFrameDeserializer::ReceiveBuffer rbuf = bfd.BeginReceive(); in TEST()
295 ASSERT_TRUE(bfd.EndReceive(frame.size())); in TEST()
299 auto decoded_frame = bfd.PopNextFrame(); in TEST()
307 ASSERT_EQ(0u, bfd.size()); in TEST()
326 BufferedFrameDeserializer bfd(kMaxCapacity); in TEST() local
345 BufferedFrameDeserializer::ReceiveBuffer rbuf = bfd.BeginReceive(); in TEST()
348 ASSERT_TRUE(bfd.EndReceive(frame1.size() + frame2_chunk1.size())); in TEST()
350 rbuf = bfd.BeginReceive(); in TEST()
352 ASSERT_TRUE(bfd.EndReceive(frame2_chunk2.size())); in TEST()
354 rbuf = bfd.BeginReceive(); in TEST()
356 ASSERT_TRUE(bfd.EndReceive(frame3.size())); in TEST()
358 rbuf = bfd.BeginReceive(); in TEST()
360 ASSERT_TRUE(bfd.EndReceive(frame4.size())); in TEST()
362 std::unique_ptr<Frame> decoded_frame_1 = bfd.PopNextFrame(); in TEST()
366 std::unique_ptr<Frame> decoded_frame_2 = bfd.PopNextFrame(); in TEST()
370 std::unique_ptr<Frame> decoded_frame_3 = bfd.PopNextFrame(); in TEST()
374 std::unique_ptr<Frame> decoded_frame_4 = bfd.PopNextFrame(); in TEST()
378 ASSERT_FALSE(bfd.PopNextFrame()); in TEST()