Lines Matching refs:bfd
99 BufferedFrameDeserializer bfd; in TEST() local
102 BufferedFrameDeserializer::ReceiveBuffer rbuf = bfd.BeginReceive(); in TEST()
107 ASSERT_TRUE(bfd.EndReceive(frame.size())); in TEST()
110 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()
243 ASSERT_FALSE(bfd.PopNextFrame()); in TEST()
244 ASSERT_EQ(0u, bfd.size()); in TEST()
249 BufferedFrameDeserializer bfd; in TEST() local
250 BufferedFrameDeserializer::ReceiveBuffer rbuf = bfd.BeginReceive(); in TEST()
254 ASSERT_FALSE(bfd.EndReceive(kHeaderSize + 20)); in TEST()
261 BufferedFrameDeserializer bfd; in TEST() local
265 BufferedFrameDeserializer::ReceiveBuffer rbuf = bfd.BeginReceive(); in TEST()
269 ASSERT_TRUE(bfd.EndReceive(1)); in TEST()
271 ASSERT_FALSE(bfd.PopNextFrame()) << off << "/" << frame.size(); in TEST()
272 ASSERT_EQ(off + 1, bfd.size()); in TEST()
274 ASSERT_TRUE(bfd.PopNextFrame()); in TEST()
284 BufferedFrameDeserializer bfd; in TEST() local
292 BufferedFrameDeserializer::ReceiveBuffer rbuf = bfd.BeginReceive(); in TEST()
294 ASSERT_TRUE(bfd.EndReceive(frame.size())); in TEST()
298 auto decoded_frame = bfd.PopNextFrame(); in TEST()
305 ASSERT_EQ(0u, bfd.size()); in TEST()
324 BufferedFrameDeserializer bfd(kMaxCapacity); in TEST() local
343 BufferedFrameDeserializer::ReceiveBuffer rbuf = bfd.BeginReceive(); in TEST()
346 ASSERT_TRUE(bfd.EndReceive(frame1.size() + frame2_chunk1.size())); in TEST()
348 rbuf = bfd.BeginReceive(); in TEST()
350 ASSERT_TRUE(bfd.EndReceive(frame2_chunk2.size())); in TEST()
352 rbuf = bfd.BeginReceive(); in TEST()
354 ASSERT_TRUE(bfd.EndReceive(frame3.size())); in TEST()
356 rbuf = bfd.BeginReceive(); in TEST()
358 ASSERT_TRUE(bfd.EndReceive(frame4.size())); in TEST()
360 std::unique_ptr<Frame> decoded_frame_1 = bfd.PopNextFrame(); in TEST()
364 std::unique_ptr<Frame> decoded_frame_2 = bfd.PopNextFrame(); in TEST()
368 std::unique_ptr<Frame> decoded_frame_3 = bfd.PopNextFrame(); in TEST()
372 std::unique_ptr<Frame> decoded_frame_4 = bfd.PopNextFrame(); in TEST()
376 ASSERT_FALSE(bfd.PopNextFrame()); in TEST()