File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -519,12 +519,14 @@ TEST_F(TestBufferedInputStream, PeekAfterExhaustingBuffer) {
519519 // SetBufferSize should reset buffer_pos_ to 0 and reuse the beginning of the buffer
520520 MakeExample1 (/* buffer_size=*/ 10 , default_memory_pool (), /* raw_read_bound=*/ 25 );
521521
522- // Read all buffered bytes to exhaust the buffer (bytes_buffered_ == 0)
523- // At this point, buffer_pos_ may be non-zero if we've consumed the buffer
522+ // Fill the buffer
524523 ASSERT_OK_AND_ASSIGN (auto view, buffered_->Peek (10 ));
525524 EXPECT_EQ (view, kExample1 .substr (0 , 10 ));
526525 ASSERT_EQ (10 , buffered_->bytes_buffered ());
527526 ASSERT_EQ (10 , buffered_->buffer_size ());
527+
528+ // Read all buffered bytes to exhaust the buffer (bytes_buffered_ == 0),
529+ // at this point buffer_pos_ is non-zero
528530 ASSERT_OK_AND_ASSIGN (auto bytes, buffered_->Read (10 ));
529531 EXPECT_EQ (std::string_view (*bytes), kExample1 .substr (0 , 10 ));
530532 ASSERT_EQ (0 , buffered_->bytes_buffered ());
You can’t perform that action at this time.
0 commit comments