Try to handle unsigned wchar_t (arm) a bit better
This commit is contained in:
parent
3a4cf1a02e
commit
567b40eeb1
|
@ -117,9 +117,11 @@ struct LinkedPtrLessThan {
|
||||||
// To gcc,
|
// To gcc,
|
||||||
// wchar_t == signed wchar_t != unsigned wchar_t == unsigned int
|
// wchar_t == signed wchar_t != unsigned wchar_t == unsigned int
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
|
#if !defined(__WCHAR_UNSIGNED__)
|
||||||
// signed/unsigned wchar_t are valid types.
|
// signed/unsigned wchar_t are valid types.
|
||||||
# define GMOCK_HAS_SIGNED_WCHAR_T_ 1
|
# define GMOCK_HAS_SIGNED_WCHAR_T_ 1
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
// In what follows, we use the term "kind" to indicate whether a type
|
// In what follows, we use the term "kind" to indicate whether a type
|
||||||
// is bool, an integer type (excluding bool), a floating-point type,
|
// is bool, an integer type (excluding bool), a floating-point type,
|
||||||
|
|
|
@ -107,7 +107,11 @@ TEST(BuiltInDefaultValueTest, IsZeroForNumericTypes) {
|
||||||
EXPECT_EQ(0, BuiltInDefaultValue<signed wchar_t>::Get());
|
EXPECT_EQ(0, BuiltInDefaultValue<signed wchar_t>::Get());
|
||||||
#endif
|
#endif
|
||||||
#if GMOCK_WCHAR_T_IS_NATIVE_
|
#if GMOCK_WCHAR_T_IS_NATIVE_
|
||||||
|
#if !defined(__WCHAR_UNSIGNED__)
|
||||||
EXPECT_EQ(0, BuiltInDefaultValue<wchar_t>::Get());
|
EXPECT_EQ(0, BuiltInDefaultValue<wchar_t>::Get());
|
||||||
|
#else
|
||||||
|
EXPECT_EQ(0U, BuiltInDefaultValue<wchar_t>::Get());
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
EXPECT_EQ(0U, BuiltInDefaultValue<unsigned short>::Get()); // NOLINT
|
EXPECT_EQ(0U, BuiltInDefaultValue<unsigned short>::Get()); // NOLINT
|
||||||
EXPECT_EQ(0, BuiltInDefaultValue<signed short>::Get()); // NOLINT
|
EXPECT_EQ(0, BuiltInDefaultValue<signed short>::Get()); // NOLINT
|
||||||
|
|
Loading…
Reference in New Issue
Block a user