Lines Matching refs:read_position
46 int read_position = 0;
47 while (read_position < kDataSize) {
53 EXPECT_GE(write_position, read_position);
54 EXPECT_EQ(write_position - read_position, buffer_.forward_bytes());
62 EXPECT_EQ(0, memcmp(write_buffer_, data_ + read_position, bytes_copied));
68 EXPECT_EQ(0, memcmp(write_buffer_, data_ + read_position, bytes_read));
69 read_position += bytes_read;
70 EXPECT_GE(write_position, read_position);
71 EXPECT_EQ(write_position - read_position, buffer_.forward_bytes());
89 int read_position = 0;
96 EXPECT_EQ(0, memcmp(write_buffer_, data_ + read_position, kReadSize));
97 read_position += kReadSize;
102 read_position += 2 * kReadSize;
108 EXPECT_EQ(0, memcmp(write_buffer_, data_ + read_position, kReadSize));
114 EXPECT_EQ(0, memcmp(write_buffer_, data_ + read_position, kReadSize));
115 read_position += kReadSize;
120 read_position -= 3 * kReadSize;
126 EXPECT_EQ(0, memcmp(write_buffer_, data_ + read_position, kReadSize));
132 EXPECT_EQ(0, memcmp(write_buffer_, data_ + read_position, kReadSize));
133 read_position += kReadSize;
138 EXPECT_EQ(0, memcmp(write_buffer_, data_ + read_position, kReadSize));
144 EXPECT_EQ(0, memcmp(write_buffer_, data_ + read_position, kReadSize));
145 read_position += kReadSize;
150 read_position += kReadSize;
173 int read_position = 0;
179 EXPECT_EQ(0, memcmp(write_buffer_, data_ + read_position, bytes_read));
184 read_position += bytes_read;
185 EXPECT_GE(kMaxWriteSize, read_position);
186 EXPECT_EQ(kMaxWriteSize - read_position, buffer_.forward_bytes());
247 int read_position = 0;
248 while (read_position < kDataSize) {
256 EXPECT_GE(write_position, read_position);
257 EXPECT_EQ(write_position - read_position, buffer_.forward_bytes());
265 read_position += seek_size;
266 EXPECT_GE(write_position, read_position);
267 EXPECT_EQ(write_position - read_position, buffer_.forward_bytes());
273 EXPECT_EQ(0, memcmp(write_buffer_, data_ + read_position, bytes_read));
274 read_position += bytes_read;
275 EXPECT_GE(write_position, read_position);
276 EXPECT_EQ(write_position - read_position, buffer_.forward_bytes());