Home | History | Annotate | Download | only in bsdiff

Lines Matching refs:Read

26   MOCK_METHOD3(Read, bool(void*, size_t, size_t*));
92 // We use a failing Read() call to trigger the actual seek call to the
95 EXPECT_CALL(*mock_file_, Read(_, _, _)).WillOnce(Return(false));
99 EXPECT_FALSE(file.Read(nullptr, 1, &bytes_read));
116 EXPECT_CALL(*mock_file_, Read(buf, 5, _)).WillOnce(SucceedIO());
118 EXPECT_CALL(*mock_file_, Read(buf + 5, 7, _)).WillOnce(SucceedIO());
120 EXPECT_CALL(*mock_file_, Read(buf + 12, 3, _)).WillOnce(SucceedIO());
122 // FileExtents::Read() should read everything in one shot, by reading all
123 // the little chunks. Note that it doesn't attempt to read past the end of the
126 EXPECT_TRUE(file.Read(buf, 100, &bytes_read));
137 EXPECT_CALL(*mock_file_, Read(buf, 2, _)).WillOnce(SucceedIO());
139 EXPECT_CALL(*mock_file_, Read(buf, 3, _)).WillOnce(SucceedIO());
141 EXPECT_CALL(*mock_file_, Read(buf + 3, 5, _)).WillOnce(SucceedIO());
143 EXPECT_CALL(*mock_file_, Read(buf, 2, _)).WillOnce(SucceedIO());
145 EXPECT_CALL(*mock_file_, Read(buf + 2, 3, _)).WillOnce(SucceedIO());
148 EXPECT_TRUE(file.Read(buf, 2, &bytes_read));
150 EXPECT_TRUE(file.Read(buf, 8, &bytes_read));
152 EXPECT_TRUE(file.Read(buf, 100, &bytes_read));
162 EXPECT_CALL(*mock_file_, Read(buf, 1, _)).WillOnce(SucceedIO());
164 // We expect to read only part of the second extent.
165 EXPECT_CALL(*mock_file_, Read(buf + 1, 1, _)).WillOnce(SucceedIO());
168 EXPECT_TRUE(file.Read(buf, 2, &bytes_read));
177 EXPECT_CALL(*mock_file_, Read(_, 1, _)).WillOnce(SucceedIO());
178 // A second read that fails will succeed if there was partial data read.
179 EXPECT_CALL(*mock_file_, Read(_, 10, _)).WillOnce(Return(false));
182 EXPECT_TRUE(file.Read(nullptr, 100, &bytes_read));
189 EXPECT_CALL(*mock_file_, Read(_, 1, _)).WillOnce(Return(false));
191 EXPECT_FALSE(file.Read(nullptr, 1, &bytes_read));
201 EXPECT_CALL(*mock_file_, Read(buf, 1, _)).WillOnce(SucceedIO());
202 EXPECT_CALL(*mock_file_, Read(buf + 1, _, _)).WillOnce(SucceedPartialIO(3));
203 EXPECT_CALL(*mock_file_, Read(buf + 4, _, _)).WillOnce(SucceedPartialIO(0));
206 EXPECT_TRUE(file.Read(buf, 100, &bytes_read));