aboutsummaryrefslogtreecommitdiffstats
path: root/include/gtest/internal/gtest-port.h
diff options
context:
space:
mode:
authorzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2012-06-07 20:34:34 +0000
committerzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2012-06-07 20:34:34 +0000
commita88c9a88e49e90ec414175543b2b7ff2f70866a7 (patch)
tree617807532cbbd68ce8e684a570791231b1b9cd92 /include/gtest/internal/gtest-port.h
parenta3b859162dd7a4a1798cf8753a03098f2cbdb62e (diff)
downloadgoogletest-a88c9a88e49e90ec414175543b2b7ff2f70866a7.tar.gz
googletest-a88c9a88e49e90ec414175543b2b7ff2f70866a7.tar.bz2
googletest-a88c9a88e49e90ec414175543b2b7ff2f70866a7.zip
Improves gtest's failure messages. In particulars, char pointers and
char arrays are not escapped properly.
Diffstat (limited to 'include/gtest/internal/gtest-port.h')
-rw-r--r--include/gtest/internal/gtest-port.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/gtest/internal/gtest-port.h b/include/gtest/internal/gtest-port.h
index 08703e31..d4b69ce6 100644
--- a/include/gtest/internal/gtest-port.h
+++ b/include/gtest/internal/gtest-port.h
@@ -1585,6 +1585,10 @@ inline bool IsUpper(char ch) {
inline bool IsXDigit(char ch) {
return isxdigit(static_cast<unsigned char>(ch)) != 0;
}
+inline bool IsXDigit(wchar_t ch) {
+ const unsigned char low_byte = static_cast<unsigned char>(ch);
+ return ch == low_byte && isxdigit(low_byte) != 0;
+}
inline char ToLower(char ch) {
return static_cast<char>(tolower(static_cast<unsigned char>(ch)));