Fixed compile errors (signed / unsigned comparison) in cuckoo_table_db_test on Mac

Summary:
Fixed compile errors (signed / unsigned comparison) in cuckoo_table_db_test on Mac

Test Plan:
make cuckoo_table_db_test
main
Yueh-Hsuan Chiang 10 years ago
parent 1562653ba0
commit 0138b8eba8
  1. 14
      db/cuckoo_table_db_test.cc

@ -124,7 +124,7 @@ TEST(CuckooTableDBTest, Flush) {
TablePropertiesCollection ptc;
reinterpret_cast<DB*>(dbfull())->GetPropertiesOfAllTables(&ptc);
ASSERT_EQ(1U, ptc.size());
ASSERT_EQ(3, ptc.begin()->second->num_entries);
ASSERT_EQ(3U, ptc.begin()->second->num_entries);
ASSERT_EQ("1", FilesPerLevel());
ASSERT_EQ("v1", Get("key1"));
@ -143,8 +143,8 @@ TEST(CuckooTableDBTest, Flush) {
reinterpret_cast<DB*>(dbfull())->GetPropertiesOfAllTables(&ptc);
ASSERT_EQ(2U, ptc.size());
auto row = ptc.begin();
ASSERT_EQ(3, row->second->num_entries);
ASSERT_EQ(3, (++row)->second->num_entries);
ASSERT_EQ(3U, row->second->num_entries);
ASSERT_EQ(3U, (++row)->second->num_entries);
ASSERT_EQ("2", FilesPerLevel());
ASSERT_EQ("v1", Get("key1"));
ASSERT_EQ("v2", Get("key2"));
@ -160,9 +160,9 @@ TEST(CuckooTableDBTest, Flush) {
reinterpret_cast<DB*>(dbfull())->GetPropertiesOfAllTables(&ptc);
ASSERT_EQ(3U, ptc.size());
row = ptc.begin();
ASSERT_EQ(3, row->second->num_entries);
ASSERT_EQ(3, (++row)->second->num_entries);
ASSERT_EQ(3, (++row)->second->num_entries);
ASSERT_EQ(3U, row->second->num_entries);
ASSERT_EQ(3U, (++row)->second->num_entries);
ASSERT_EQ(3U, (++row)->second->num_entries);
ASSERT_EQ("3", FilesPerLevel());
ASSERT_EQ("v1", Get("key1"));
ASSERT_EQ("v2", Get("key2"));
@ -183,7 +183,7 @@ TEST(CuckooTableDBTest, FlushWithDuplicateKeys) {
TablePropertiesCollection ptc;
reinterpret_cast<DB*>(dbfull())->GetPropertiesOfAllTables(&ptc);
ASSERT_EQ(1U, ptc.size());
ASSERT_EQ(2, ptc.begin()->second->num_entries);
ASSERT_EQ(2U, ptc.begin()->second->num_entries);
ASSERT_EQ("1", FilesPerLevel());
ASSERT_EQ("v3", Get("key1"));
ASSERT_EQ("v2", Get("key2"));

Loading…
Cancel
Save