aboutsummaryrefslogtreecommitdiffstats
path: root/googletest/src
diff options
context:
space:
mode:
authorXiaoyi Zhang <zhangxy@google.com>2019-11-04 11:43:27 -0500
committerXiaoyi Zhang <zhangxy@google.com>2019-11-04 11:43:27 -0500
commit8697709e0308af4cd5b09dc108480804e5447cf0 (patch)
treec28c9fae6cb42e78fdb0750a63fcf8a814966b0d /googletest/src
parente8a82dc7ede61c4af3b9d75aa0e953b8cecfc8bb (diff)
parent6e87238c9b14bcd749364e9b7125622a985a8a20 (diff)
downloadgoogletest-8697709e0308af4cd5b09dc108480804e5447cf0.tar.gz
googletest-8697709e0308af4cd5b09dc108480804e5447cf0.tar.bz2
googletest-8697709e0308af4cd5b09dc108480804e5447cf0.zip
Merge pull request #2453 from kuzkry:gtest-port-clean-up_kMaxBiggestInt
PiperOrigin-RevId: 278008286
Diffstat (limited to 'googletest/src')
-rw-r--r--googletest/src/gtest.cc31
1 files changed, 16 insertions, 15 deletions
diff --git a/googletest/src/gtest.cc b/googletest/src/gtest.cc
index 7c1c9edc..8afb070d 100644
--- a/googletest/src/gtest.cc
+++ b/googletest/src/gtest.cc
@@ -1442,8 +1442,9 @@ namespace internal {
// The helper function for {ASSERT|EXPECT}_EQ with int or enum
// arguments.
AssertionResult CmpHelperEQ(const char* lhs_expression,
- const char* rhs_expression, std::intmax_t lhs,
- std::intmax_t rhs) {
+ const char* rhs_expression,
+ BiggestInt lhs,
+ BiggestInt rhs) {
if (lhs == rhs) {
return AssertionSuccess();
}
@@ -1456,20 +1457,20 @@ AssertionResult CmpHelperEQ(const char* lhs_expression,
}
// A macro for implementing the helper functions needed to implement
-// ASSERT_?? and EXPECT_?? with integer or enum arguments. It is here
+// ASSERT_?? and EXPECT_?? with integer or enum arguments. It is here
// just to avoid copy-and-paste of similar code.
-#define GTEST_IMPL_CMP_HELPER_(op_name, op) \
- AssertionResult CmpHelper##op_name(const char* expr1, const char* expr2, \
- std::intmax_t val1, std::intmax_t val2) { \
- if (val1 op val2) { \
- return AssertionSuccess(); \
- } else { \
- return AssertionFailure() \
- << "Expected: (" << expr1 << ") " #op " (" << expr2 \
- << "), actual: " << FormatForComparisonFailureMessage(val1, val2) \
- << " vs " << FormatForComparisonFailureMessage(val2, val1); \
- } \
- }
+#define GTEST_IMPL_CMP_HELPER_(op_name, op)\
+AssertionResult CmpHelper##op_name(const char* expr1, const char* expr2, \
+ BiggestInt val1, BiggestInt val2) {\
+ if (val1 op val2) {\
+ return AssertionSuccess();\
+ } else {\
+ return AssertionFailure() \
+ << "Expected: (" << expr1 << ") " #op " (" << expr2\
+ << "), actual: " << FormatForComparisonFailureMessage(val1, val2)\
+ << " vs " << FormatForComparisonFailureMessage(val2, val1);\
+ }\
+}
// Implements the helper function for {ASSERT|EXPECT}_NE with int or
// enum arguments.