diff --git a/tools/ldb_cmd_test.cc b/tools/ldb_cmd_test.cc index b4a8772d5..48b0a69e2 100644 --- a/tools/ldb_cmd_test.cc +++ b/tools/ldb_cmd_test.cc @@ -26,7 +26,7 @@ TEST_F(LdbCmdTest, HexToString) { auto actual = rocksdb::LDBCommand::HexToString(inPair.first); auto expected = inPair.second; for (unsigned int i = 0; i < actual.length(); i++) { - EXPECT_EQ(expected[i], static_cast(actual[i])); + EXPECT_EQ(expected[i], static_cast((signed char) actual[i])); } auto reverse = rocksdb::LDBCommand::StringToHex(actual); EXPECT_STRCASEEQ(inPair.first.c_str(), reverse.c_str());