diff options
author | Abseil Team <absl-team@google.com> | 2019-11-20 19:36:06 (GMT) |
---|---|---|
committer | Gennadiy Civil <misterg@google.com> | 2019-11-22 21:33:15 (GMT) |
commit | 717ce7feb87278b81dad756d973693024621f8e8 (patch) | |
tree | 2c016351f4359b94f75fa2af762d2138998d8063 /googlemock/include/gmock | |
parent | 200ff599496e20f4e39566feeaf2f6734ca7570f (diff) | |
download | googletest-717ce7feb87278b81dad756d973693024621f8e8.zip googletest-717ce7feb87278b81dad756d973693024621f8e8.tar.gz googletest-717ce7feb87278b81dad756d973693024621f8e8.tar.bz2 |
Googletest export
Use standard C++11 integer types in gtest-port.h.
Remove testing::internal::{Int,Uint}{32,64} in favor of types
guaranteed to be in <cstdint> since C++11.
Tests for built-in integer type coverage are switched from
{Int,Uint}64 to [unsigned] long long, which is guaranteed by
C++11 to exist and be at least 64-bit wide.
PiperOrigin-RevId: 281565263
Diffstat (limited to 'googlemock/include/gmock')
-rw-r--r-- | googlemock/include/gmock/gmock-actions.h | 4 | ||||
-rw-r--r-- | googlemock/include/gmock/internal/gmock-internal-utils.h | 6 | ||||
-rw-r--r-- | googlemock/include/gmock/internal/gmock-port.h | 6 |
3 files changed, 7 insertions, 9 deletions
diff --git a/googlemock/include/gmock/gmock-actions.h b/googlemock/include/gmock/gmock-actions.h index b040004..dcdbab5 100644 --- a/googlemock/include/gmock/gmock-actions.h +++ b/googlemock/include/gmock/gmock-actions.h @@ -162,8 +162,8 @@ GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(unsigned int, 0U); GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(signed int, 0); GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(unsigned long, 0UL); // NOLINT GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(signed long, 0L); // NOLINT -GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(UInt64, 0); -GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(Int64, 0); +GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(unsigned long long, 0); // NOLINT +GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(signed long long, 0); // NOLINT GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(float, 0); GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(double, 0); diff --git a/googlemock/include/gmock/internal/gmock-internal-utils.h b/googlemock/include/gmock/internal/gmock-internal-utils.h index 5fd169e..66cf857 100644 --- a/googlemock/include/gmock/internal/gmock-internal-utils.h +++ b/googlemock/include/gmock/internal/gmock-internal-utils.h @@ -136,15 +136,13 @@ GMOCK_DECLARE_KIND_(int, kInteger); GMOCK_DECLARE_KIND_(unsigned int, kInteger); GMOCK_DECLARE_KIND_(long, kInteger); // NOLINT GMOCK_DECLARE_KIND_(unsigned long, kInteger); // NOLINT +GMOCK_DECLARE_KIND_(long long, kInteger); // NOLINT +GMOCK_DECLARE_KIND_(unsigned long long, kInteger); // NOLINT #if GMOCK_WCHAR_T_IS_NATIVE_ GMOCK_DECLARE_KIND_(wchar_t, kInteger); #endif -// Non-standard integer types. -GMOCK_DECLARE_KIND_(Int64, kInteger); -GMOCK_DECLARE_KIND_(UInt64, kInteger); - // All standard floating-point types. GMOCK_DECLARE_KIND_(float, kFloatingPoint); GMOCK_DECLARE_KIND_(double, kFloatingPoint); diff --git a/googlemock/include/gmock/internal/gmock-port.h b/googlemock/include/gmock/internal/gmock-port.h index 063e292..70872ef 100644 --- a/googlemock/include/gmock/internal/gmock-port.h +++ b/googlemock/include/gmock/internal/gmock-port.h @@ -42,6 +42,7 @@ #include <assert.h> #include <stdlib.h> +#include <cstdint> #include <iostream> // Most of the utilities needed for porting Google Mock are also @@ -69,8 +70,7 @@ // Macros for declaring flags. # define GMOCK_DECLARE_bool_(name) extern GTEST_API_ bool GMOCK_FLAG(name) -# define GMOCK_DECLARE_int32_(name) \ - extern GTEST_API_ ::testing::internal::Int32 GMOCK_FLAG(name) +# define GMOCK_DECLARE_int32_(name) extern GTEST_API_ int32_t GMOCK_FLAG(name) # define GMOCK_DECLARE_string_(name) \ extern GTEST_API_ ::std::string GMOCK_FLAG(name) @@ -78,7 +78,7 @@ # define GMOCK_DEFINE_bool_(name, default_val, doc) \ GTEST_API_ bool GMOCK_FLAG(name) = (default_val) # define GMOCK_DEFINE_int32_(name, default_val, doc) \ - GTEST_API_ ::testing::internal::Int32 GMOCK_FLAG(name) = (default_val) + GTEST_API_ int32_t GMOCK_FLAG(name) = (default_val) # define GMOCK_DEFINE_string_(name, default_val, doc) \ GTEST_API_ ::std::string GMOCK_FLAG(name) = (default_val) |