diff options
author | zhanyong.wan <zhanyong.wan@8415998a-534a-0410-bf83-d39667b30386> | 2009-09-25 18:55:50 +0000 |
---|---|---|
committer | zhanyong.wan <zhanyong.wan@8415998a-534a-0410-bf83-d39667b30386> | 2009-09-25 18:55:50 +0000 |
commit | 95b12332c345cee508a8e2b68e007280392506e0 (patch) | |
tree | b913cceb0dc73776234068c5c620df8d9ea3e29c /include/gmock/gmock-actions.h | |
parent | 2d970ee3bad530703ff24bc3a011390b45cdd293 (diff) | |
download | googletest-95b12332c345cee508a8e2b68e007280392506e0.tar.gz googletest-95b12332c345cee508a8e2b68e007280392506e0.tar.bz2 googletest-95b12332c345cee508a8e2b68e007280392506e0.zip |
Makes gmock work on Symbian (both 3rd & 5th editions), original patch contributed by Mika Raento.
Diffstat (limited to 'include/gmock/gmock-actions.h')
-rw-r--r-- | include/gmock/gmock-actions.h | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/include/gmock/gmock-actions.h b/include/gmock/gmock-actions.h index f7daf826..7f21a7d4 100644 --- a/include/gmock/gmock-actions.h +++ b/include/gmock/gmock-actions.h @@ -125,32 +125,13 @@ GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(unsigned char, '\0'); GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(signed char, '\0'); GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(char, '\0'); -// signed wchar_t and unsigned wchar_t are NOT in the C++ standard. -// Using them is a bad practice and not portable. So don't use them. -// -// Still, Google Mock is designed to work even if the user uses signed -// wchar_t or unsigned wchar_t (obviously, assuming the compiler -// supports them). -// -// To gcc, -// -// wchar_t == signed wchar_t != unsigned wchar_t == unsigned int -// -// MSVC does not recognize signed wchar_t or unsigned wchar_t. It -// treats wchar_t as a native type usually, but treats it as the same -// as unsigned short when the compiler option /Zc:wchar_t- is -// specified. -// -// Therefore we provide a default action for wchar_t when compiled -// with gcc or _NATIVE_WCHAR_T_DEFINED is defined. -// // There's no need for a default action for signed wchar_t, as that // type is the same as wchar_t for gcc, and invalid for MSVC. // // There's also no need for a default action for unsigned wchar_t, as // that type is the same as unsigned int for gcc, and invalid for // MSVC. -#if defined(__GNUC__) || defined(_NATIVE_WCHAR_T_DEFINED) +#if GMOCK_WCHAR_T_IS_NATIVE_ GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(wchar_t, 0U); // NOLINT #endif |