mirror of
https://github.com/facebook/rocksdb.git
synced 2024-11-26 16:30:56 +00:00
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
This commit is contained in:
parent
66a3a87ab3
commit
335e4ce8ca
|
@ -599,7 +599,7 @@ TEST_F(OptionsTest, GetColumnFamilyOptionsFromStringTest) {
|
||||||
"plain_table_factory={};arena_block_size=1024",
|
"plain_table_factory={};arena_block_size=1024",
|
||||||
&new_cf_opt));
|
&new_cf_opt));
|
||||||
ASSERT_TRUE(new_cf_opt.table_factory != nullptr);
|
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
|
// Non-empty
|
||||||
ASSERT_OK(GetColumnFamilyOptionsFromString(base_cf_opt,
|
ASSERT_OK(GetColumnFamilyOptionsFromString(base_cf_opt,
|
||||||
"write_buffer_size=10;max_write_buffer_number=16;"
|
"write_buffer_size=10;max_write_buffer_number=16;"
|
||||||
|
@ -607,7 +607,7 @@ TEST_F(OptionsTest, GetColumnFamilyOptionsFromStringTest) {
|
||||||
"arena_block_size=1024",
|
"arena_block_size=1024",
|
||||||
&new_cf_opt));
|
&new_cf_opt));
|
||||||
ASSERT_TRUE(new_cf_opt.table_factory != nullptr);
|
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
|
#endif // !ROCKSDB_LITE
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue