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

@@ -82,15 +82,6 @@ class GTEST_API_ String {
public:
// Static utility methods
// Returns the input enclosed in double quotes if it's not NULL;
// otherwise returns "(null)". For example, "\"Hello\"" is returned
// for input "Hello".
//
// This is useful for printing a C string in the syntax of a literal.
//
// Known issue: escape sequences are not handled yet.
static String ShowCStringQuoted(const char* c_str);
// Clones a 0-terminated C string, allocating memory using new. The
// caller is responsible for deleting the return value using
// delete[]. Returns the cloned string, or NULL if the input is
@@ -139,10 +130,6 @@ class GTEST_API_ String {
// returned.
static String ShowWideCString(const wchar_t* wide_c_str);
// Similar to ShowWideCString(), except that this function encloses
// the converted string in double quotes.
static String ShowWideCStringQuoted(const wchar_t* wide_c_str);
// Compares two wide C strings. Returns true iff they have the same
// content.
//