summaryrefslogtreecommitdiffstats
path: root/googletest/include/gtest/internal/gtest-internal.h
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2019-11-20 19:36:06 (GMT)
committerGennadiy Civil <misterg@google.com>2019-11-22 21:33:15 (GMT)
commit717ce7feb87278b81dad756d973693024621f8e8 (patch)
tree2c016351f4359b94f75fa2af762d2138998d8063 /googletest/include/gtest/internal/gtest-internal.h
parent200ff599496e20f4e39566feeaf2f6734ca7570f (diff)
downloadgoogletest-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 'googletest/include/gtest/internal/gtest-internal.h')
-rw-r--r--googletest/include/gtest/internal/gtest-internal.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/googletest/include/gtest/internal/gtest-internal.h b/googletest/include/gtest/internal/gtest-internal.h
index 44b037a..eac831a 100644
--- a/googletest/include/gtest/internal/gtest-internal.h
+++ b/googletest/include/gtest/internal/gtest-internal.h
@@ -53,6 +53,7 @@
#include <ctype.h>
#include <float.h>
#include <string.h>
+#include <cstdint>
#include <iomanip>
#include <limits>
#include <map>
@@ -842,18 +843,18 @@ struct GTEST_API_ TrueWithString {
// but it's good enough for our purposes.
class GTEST_API_ Random {
public:
- static const UInt32 kMaxRange = 1u << 31;
+ static const uint32_t kMaxRange = 1u << 31;
- explicit Random(UInt32 seed) : state_(seed) {}
+ explicit Random(uint32_t seed) : state_(seed) {}
- void Reseed(UInt32 seed) { state_ = seed; }
+ void Reseed(uint32_t seed) { state_ = seed; }
// Generates a random number from [0, range). Crashes if 'range' is
// 0 or greater than kMaxRange.
- UInt32 Generate(UInt32 range);
+ uint32_t Generate(uint32_t range);
private:
- UInt32 state_;
+ uint32_t state_;
GTEST_DISALLOW_COPY_AND_ASSIGN_(Random);
};