Fix more signed-unsigned comparisons
Summary: Some comparisons left in log_test.cc and db_test.cc complained by make Test Plan: make Reviewers: dhruba, sheki Reviewed By: dhruba Differential Revision: https://reviews.facebook.net/D9537
This commit is contained in:
parent
487168cdcf
commit
b1bea58457
@ -1480,7 +1480,7 @@ TEST(DBTest, CompactionFilter) {
|
|||||||
while (iter->Valid()) {
|
while (iter->Valid()) {
|
||||||
ParsedInternalKey ikey;
|
ParsedInternalKey ikey;
|
||||||
ASSERT_EQ(ParseInternalKey(iter->key(), &ikey), true);
|
ASSERT_EQ(ParseInternalKey(iter->key(), &ikey), true);
|
||||||
ASSERT_NE(ikey.sequence, 0);
|
ASSERT_NE(ikey.sequence, (unsigned)0);
|
||||||
count++;
|
count++;
|
||||||
iter->Next();
|
iter->Next();
|
||||||
}
|
}
|
||||||
|
@ -450,13 +450,13 @@ TEST(LogTest, ErrorJoinsRecords) {
|
|||||||
Write("correct");
|
Write("correct");
|
||||||
|
|
||||||
// Wipe the middle block
|
// Wipe the middle block
|
||||||
for (int offset = kBlockSize; offset < 2*kBlockSize; offset++) {
|
for (unsigned int offset = kBlockSize; offset < 2*kBlockSize; offset++) {
|
||||||
SetByte(offset, 'x');
|
SetByte(offset, 'x');
|
||||||
}
|
}
|
||||||
|
|
||||||
ASSERT_EQ("correct", Read());
|
ASSERT_EQ("correct", Read());
|
||||||
ASSERT_EQ("EOF", Read());
|
ASSERT_EQ("EOF", Read());
|
||||||
const int dropped = DroppedBytes();
|
const unsigned int dropped = DroppedBytes();
|
||||||
ASSERT_LE(dropped, 2*kBlockSize + 100);
|
ASSERT_LE(dropped, 2*kBlockSize + 100);
|
||||||
ASSERT_GE(dropped, 2*kBlockSize);
|
ASSERT_GE(dropped, 2*kBlockSize);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user