options_test: fix a bug of assertion

Summary: new_cf_opt.table_factory->Name() is char*, ASSERT_EQ doesn't work with char* directly. Construct a string using it.

Test Plan: Run the test that failed.

Reviewers: igor, kradhakrishnan, rven, IslamAbdelRahman, anthony

Reviewed By: anthony

Subscribers: leveldb, dhruba

Differential Revision: https://reviews.facebook.net/D49767
main
sdong 9 years ago
parent 66a3a87ab3
commit 335e4ce8ca
  1. 4
      util/options_test.cc

@ -599,7 +599,7 @@ TEST_F(OptionsTest, GetColumnFamilyOptionsFromStringTest) {
"plain_table_factory={};arena_block_size=1024",
&new_cf_opt));
ASSERT_TRUE(new_cf_opt.table_factory != nullptr);
ASSERT_EQ(new_cf_opt.table_factory->Name(), "PlainTable");
ASSERT_EQ(std::string(new_cf_opt.table_factory->Name()), "PlainTable");
// Non-empty
ASSERT_OK(GetColumnFamilyOptionsFromString(base_cf_opt,
"write_buffer_size=10;max_write_buffer_number=16;"
@ -607,7 +607,7 @@ TEST_F(OptionsTest, GetColumnFamilyOptionsFromStringTest) {
"arena_block_size=1024",
&new_cf_opt));
ASSERT_TRUE(new_cf_opt.table_factory != nullptr);
ASSERT_EQ(new_cf_opt.table_factory->Name(), "PlainTable");
ASSERT_EQ(std::string(new_cf_opt.table_factory->Name()), "PlainTable");
}
#endif // !ROCKSDB_LITE

Loading…
Cancel
Save