Improves gtest's failure messages. In particulars, char pointers and

char arrays are not escapped properly.
This commit is contained in:
zhanyong.wan
2012-06-07 20:34:34 +00:00
parent a3b859162d
commit a88c9a88e4
12 changed files with 550 additions and 197 deletions

View File

@@ -1065,16 +1065,6 @@ TEST(StringTest, ConvertsToGlobalString) {
#endif // GTEST_HAS_GLOBAL_STRING
// Tests String::ShowCStringQuoted().
TEST(StringTest, ShowCStringQuoted) {
EXPECT_STREQ("(null)",
String::ShowCStringQuoted(NULL).c_str());
EXPECT_STREQ("\"\"",
String::ShowCStringQuoted("").c_str());
EXPECT_STREQ("\"foo\"",
String::ShowCStringQuoted("foo").c_str());
}
// Tests String::empty().
TEST(StringTest, Empty) {
EXPECT_TRUE(String("").empty());
@@ -1305,16 +1295,6 @@ TEST(StringTest, ShowWideCString) {
EXPECT_STREQ("foo", String::ShowWideCString(L"foo").c_str());
}
// Tests String::ShowWideCStringQuoted().
TEST(StringTest, ShowWideCStringQuoted) {
EXPECT_STREQ("(null)",
String::ShowWideCStringQuoted(NULL).c_str());
EXPECT_STREQ("L\"\"",
String::ShowWideCStringQuoted(L"").c_str());
EXPECT_STREQ("L\"foo\"",
String::ShowWideCStringQuoted(L"foo").c_str());
}
# if GTEST_OS_WINDOWS_MOBILE
TEST(StringTest, AnsiAndUtf16Null) {
EXPECT_EQ(NULL, String::AnsiToUtf16(NULL));