From 3ead857a0d54ef4674eb7a19fd85fe18300b4ce3 Mon Sep 17 00:00:00 2001 From: Yueh-Hsuan Chiang Date: Fri, 10 Oct 2014 14:19:51 -0700 Subject: [PATCH] Fixed Mac compile error in util/options_test.cc Summary: Fixed the following error in Mac: ./util/testharness.h:93:19: error: comparison of integers of different signs: 'const unsigned long' and 'const int' [-Werror,-Wsign-compare] BINARY_OP(IsEq, ==) ~~~~~~~~~~~~~~~~^~~ ./util/testharness.h:86:14: note: expanded from macro 'BINARY_OP' if (! (x op y)) { \ ^ util/options_test.cc:269:3: note: in instantiation of function template specialization 'rocksdb::test::Tester::IsEq' requested here ASSERT_EQ(new_cf_opt.write_buffer_size, 5); ^ Test Plan: options_test --- util/options_test.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/util/options_test.cc b/util/options_test.cc index 6f6745aa04..f1258b8ed5 100644 --- a/util/options_test.cc +++ b/util/options_test.cc @@ -266,24 +266,24 @@ TEST(OptionsTest, GetOptionsFromStringTest) { ASSERT_TRUE(GetColumnFamilyOptionsFromString(base_cf_opt, "", &new_cf_opt)); ASSERT_TRUE(GetColumnFamilyOptionsFromString(base_cf_opt, "write_buffer_size=5", &new_cf_opt)); - ASSERT_EQ(new_cf_opt.write_buffer_size, 5); + ASSERT_EQ(new_cf_opt.write_buffer_size, 5U); ASSERT_TRUE(GetColumnFamilyOptionsFromString(base_cf_opt, "write_buffer_size=6;", &new_cf_opt)); - ASSERT_EQ(new_cf_opt.write_buffer_size, 6); + ASSERT_EQ(new_cf_opt.write_buffer_size, 6U); ASSERT_TRUE(GetColumnFamilyOptionsFromString(base_cf_opt, " write_buffer_size = 7 ", &new_cf_opt)); - ASSERT_EQ(new_cf_opt.write_buffer_size, 7); + ASSERT_EQ(new_cf_opt.write_buffer_size, 7U); ASSERT_TRUE(GetColumnFamilyOptionsFromString(base_cf_opt, " write_buffer_size = 8 ; ", &new_cf_opt)); - ASSERT_EQ(new_cf_opt.write_buffer_size, 8); + ASSERT_EQ(new_cf_opt.write_buffer_size, 8U); ASSERT_TRUE(GetColumnFamilyOptionsFromString(base_cf_opt, "write_buffer_size=9;max_write_buffer_number=10", &new_cf_opt)); - ASSERT_EQ(new_cf_opt.write_buffer_size, 9); + ASSERT_EQ(new_cf_opt.write_buffer_size, 9U); ASSERT_EQ(new_cf_opt.max_write_buffer_number, 10); ASSERT_TRUE(GetColumnFamilyOptionsFromString(base_cf_opt, "write_buffer_size=11; max_write_buffer_number = 12 ;", &new_cf_opt)); - ASSERT_EQ(new_cf_opt.write_buffer_size, 11); + ASSERT_EQ(new_cf_opt.write_buffer_size, 11U); ASSERT_EQ(new_cf_opt.max_write_buffer_number, 12); // Wrong name "max_write_buffer_number_" ASSERT_TRUE(!GetColumnFamilyOptionsFromString(base_cf_opt,