diff options
author | kosak <kosak@google.com> | 2013-02-22 20:10:40 +0000 |
---|---|---|
committer | kosak <kosak@google.com> | 2013-02-22 20:10:40 +0000 |
commit | cc1fdb58caf8d5ac9b858f615d3c42267fc5e258 (patch) | |
tree | 2821e8cd493ff783f47570fe991fc3ceab776ec7 /include/gtest/internal/gtest-string.h | |
parent | 65b5c22436fab922ea791b9b39a8fe154f0849f8 (diff) | |
download | googletest-cc1fdb58caf8d5ac9b858f615d3c42267fc5e258.tar.gz googletest-cc1fdb58caf8d5ac9b858f615d3c42267fc5e258.tar.bz2 googletest-cc1fdb58caf8d5ac9b858f615d3c42267fc5e258.zip |
Removes testing::internal::String::Format(), which causes problems as it truncates the result at 4096 chars. Also update an obsolete link in comment.
Diffstat (limited to 'include/gtest/internal/gtest-string.h')
-rw-r--r-- | include/gtest/internal/gtest-string.h | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/include/gtest/internal/gtest-string.h b/include/gtest/internal/gtest-string.h index 472dd058..7b740858 100644 --- a/include/gtest/internal/gtest-string.h +++ b/include/gtest/internal/gtest-string.h @@ -144,16 +144,14 @@ class GTEST_API_ String { static bool EndsWithCaseInsensitive( const std::string& str, const std::string& suffix); - // Formats a list of arguments to an std::string, using the same format - // spec string as for printf. - // - // We do not use the StringPrintf class as it is not universally - // available. - // - // The result is limited to 4096 characters (including the tailing - // 0). If 4096 characters are not enough to format the input, - // "<buffer exceeded>" is returned. - static std::string Format(const char* format, ...); + // Formats an int value as "%02d". + static std::string FormatIntWidth2(int value); // "%02d" for width == 2 + + // Formats an int value as "%X". + static std::string FormatHexInt(int value); + + // Formats a byte as "%02X". + static std::string FormatByte(unsigned char value); private: String(); // Not meant to be instantiated. |