diff options
author | kosak@google.com <kosak@google.com@861a406c-534a-0410-8894-cb66d6ee9925> | 2013-02-22 20:10:40 +0000 |
---|---|---|
committer | kosak@google.com <kosak@google.com@861a406c-534a-0410-8894-cb66d6ee9925> | 2013-02-22 20:10:40 +0000 |
commit | 3b8388d9490a64a47ed8cbdab2021935b1b2c76c (patch) | |
tree | 2821e8cd493ff783f47570fe991fc3ceab776ec7 /src/gtest-printers.cc | |
parent | 06458571cbeaf622eaf4f88bd7980f5a88bafeed (diff) | |
download | gtest-3b8388d9490a64a47ed8cbdab2021935b1b2c76c.tar.gz gtest-3b8388d9490a64a47ed8cbdab2021935b1b2c76c.tar.bz2 gtest-3b8388d9490a64a47ed8cbdab2021935b1b2c76c.tar.xz |
Removes testing::internal::String::Format(), which causes problems as it truncates the result at 4096 chars. Also update an obsolete link in comment.
git-svn-id: http://googletest.googlecode.com/svn/trunk@636 861a406c-534a-0410-8894-cb66d6ee9925
Diffstat (limited to 'src/gtest-printers.cc')
-rw-r--r-- | src/gtest-printers.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/gtest-printers.cc b/src/gtest-printers.cc index 898d61d..75fa408 100644 --- a/src/gtest-printers.cc +++ b/src/gtest-printers.cc @@ -176,7 +176,7 @@ static CharFormat PrintAsCharLiteralTo(Char c, ostream* os) { *os << static_cast<char>(c); return kAsIs; } else { - *os << String::Format("\\x%X", static_cast<UnsignedChar>(c)); + *os << "\\x" + String::FormatHexInt(static_cast<UnsignedChar>(c)); return kHexEscape; } } @@ -221,7 +221,7 @@ void PrintCharAndCodeTo(Char c, ostream* os) { // obvious). if (c == 0) return; - *os << " (" << String::Format("%d", c).c_str(); + *os << " (" << static_cast<int>(c); // For more convenience, we print c's code again in hexidecimal, // unless c was already printed in the form '\x##' or the code is in @@ -229,8 +229,7 @@ void PrintCharAndCodeTo(Char c, ostream* os) { if (format == kHexEscape || (1 <= c && c <= 9)) { // Do nothing. } else { - *os << String::Format(", 0x%X", - static_cast<UnsignedChar>(c)).c_str(); + *os << ", 0x" << String::FormatHexInt(static_cast<UnsignedChar>(c)); } *os << ")"; } |