summaryrefslogtreecommitdiffstats
path: root/googlemock
diff options
context:
space:
mode:
authorGennadiy Civil <misterg@google.com>2018-03-05 17:26:24 (GMT)
committerGennadiy Civil <misterg@google.com>2018-03-05 17:26:24 (GMT)
commita518bd5cf27f723cd1c2249287d43e3a7bb016c1 (patch)
tree958da545e95d20a0d41c1ff4b606546d33a23215 /googlemock
parent0d5e01ad7bf0796679417e3acdb0418f5b19fc31 (diff)
parent915c8d051d0a717f8af6559c03e4220e3c39a24c (diff)
downloadgoogletest-a518bd5cf27f723cd1c2249287d43e3a7bb016c1.zip
googletest-a518bd5cf27f723cd1c2249287d43e3a7bb016c1.tar.gz
googletest-a518bd5cf27f723cd1c2249287d43e3a7bb016c1.tar.bz2
Merge branch 'master' of https://github.com/google/googletestrefs/pull/1488/head
Diffstat (limited to 'googlemock')
-rw-r--r--googlemock/include/gmock/internal/gmock-internal-utils.h2
-rw-r--r--googlemock/test/gmock-actions_test.cc4
2 files changed, 6 insertions, 0 deletions
diff --git a/googlemock/include/gmock/internal/gmock-internal-utils.h b/googlemock/include/gmock/internal/gmock-internal-utils.h
index 319b389..37ceb54 100644
--- a/googlemock/include/gmock/internal/gmock-internal-utils.h
+++ b/googlemock/include/gmock/internal/gmock-internal-utils.h
@@ -117,9 +117,11 @@ struct LinkedPtrLessThan {
// To gcc,
// wchar_t == signed wchar_t != unsigned wchar_t == unsigned int
#ifdef __GNUC__
+#if !defined(__WCHAR_UNSIGNED__)
// signed/unsigned wchar_t are valid types.
# define GMOCK_HAS_SIGNED_WCHAR_T_ 1
#endif
+#endif
// In what follows, we use the term "kind" to indicate whether a type
// is bool, an integer type (excluding bool), a floating-point type,
diff --git a/googlemock/test/gmock-actions_test.cc b/googlemock/test/gmock-actions_test.cc
index f721839..9447c22 100644
--- a/googlemock/test/gmock-actions_test.cc
+++ b/googlemock/test/gmock-actions_test.cc
@@ -107,7 +107,11 @@ TEST(BuiltInDefaultValueTest, IsZeroForNumericTypes) {
EXPECT_EQ(0, BuiltInDefaultValue<signed wchar_t>::Get());
#endif
#if GMOCK_WCHAR_T_IS_NATIVE_
+#if !defined(__WCHAR_UNSIGNED__)
EXPECT_EQ(0, BuiltInDefaultValue<wchar_t>::Get());
+#else
+ EXPECT_EQ(0U, BuiltInDefaultValue<wchar_t>::Get());
+#endif
#endif
EXPECT_EQ(0U, BuiltInDefaultValue<unsigned short>::Get()); // NOLINT
EXPECT_EQ(0, BuiltInDefaultValue<signed short>::Get()); // NOLINT