Skip to content

Commit

Permalink
unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
JiayuZzz committed Jul 11, 2019
1 parent 78fbc05 commit efc0fe9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/blob_file_iterator_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -209,13 +209,17 @@ TEST_F(BlobFileIteratorTest, MergeIterator) {
BlobFileMergeIterator iter(std::move(iters));

iter.SeekToFirst();
for (int i = 1; i < kMaxKeyNum; i++, iter.Next()) {
int i = 1;
while (iter.Valid()) {
ASSERT_OK(iter.status());
ASSERT_TRUE(iter.Valid());
ASSERT_EQ(iter.key(), GenKey(i));
ASSERT_EQ(iter.value(), GenValue(i));
ASSERT_EQ(iter.GetBlobIndex().blob_handle, handles[i]);
i++;
iter.Next();
}
ASSERT_EQ(i, kMaxKeyNum);
}

} // namespace titandb
Expand Down

0 comments on commit efc0fe9

Please sign in to comment.