提交 8e0e22f7 编写于 作者: A Andrew Kryczka

Fix Windows build by replacing strings.h include

Summary:
strings.h header does not exist on Windows. So, we can try another way
to compare strings ignoring case.

Test Plan:
built and ran:

  $ ./ldb_cmd_test

Reviewers: sdong, yhchiang, IslamAbdelRahman

Reviewed By: IslamAbdelRahman

Subscribers: andrewkr, dhruba, leveldb

Differential Revision: https://reviews.facebook.net/D56535
上级 5675d503
......@@ -6,7 +6,6 @@
#ifndef ROCKSDB_LITE
#include "tools/ldb_cmd.h"
#include <strings.h>
#include "util/testharness.h"
class LdbCmdTest : public testing::Test {};
......@@ -26,7 +25,7 @@ TEST_F(LdbCmdTest, HexToString) {
EXPECT_EQ(expected[i], static_cast<int>(actual[i]));
}
auto reverse = rocksdb::LDBCommand::StringToHex(actual);
EXPECT_EQ(strcasecmp(inPair.first.c_str(), reverse.c_str()), 0);
EXPECT_STRCASEEQ(inPair.first.c_str(), reverse.c_str());
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册