summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkosak@google.com <kosak@google.com@8415998a-534a-0410-bf83-d39667b30386>2014-01-29 07:30:13 +0000
committerkosak@google.com <kosak@google.com@8415998a-534a-0410-bf83-d39667b30386>2014-01-29 07:30:13 +0000
commit17945db42c0b42496b2f3c6530307979f2e2a5ce (patch)
tree4694b3e7aa963e502a6975e19ec287a31d0ab58a
parent8bc4d5e59ca076d63c1a328c23d860c48d341deb (diff)
downloadgooglemock-17945db42c0b42496b2f3c6530307979f2e2a5ce.tar.gz
Suppress "Conditional expression is constant" warning on Visual Studio.
git-svn-id: http://googlemock.googlecode.com/svn/trunk@468 8415998a-534a-0410-bf83-d39667b30386
-rw-r--r--test/gmock-generated-actions_test.cc2
-rw-r--r--test/gmock-internal-utils_test.cc2
2 files changed, 4 insertions, 0 deletions
diff --git a/test/gmock-generated-actions_test.cc b/test/gmock-generated-actions_test.cc
index 3181271..a1fa6ae 100644
--- a/test/gmock-generated-actions_test.cc
+++ b/test/gmock-generated-actions_test.cc
@@ -900,7 +900,9 @@ template <typename T1, typename T2>
// pattern requires the user to use it directly.
ConcatImplActionP3<std::string, T1, T2>
Concat(const std::string& a, T1 b, T2 c) {
+ GTEST_INTENTIONAL_CONST_COND_PUSH_
if (true) {
+ GTEST_INTENTIONAL_CONST_COND_POP_
// This branch verifies that ConcatImpl() can be invoked without
// explicit template arguments.
return ConcatImpl(a, b, c);
diff --git a/test/gmock-internal-utils_test.cc b/test/gmock-internal-utils_test.cc
index 3c78f64..b6a6644 100644
--- a/test/gmock-internal-utils_test.cc
+++ b/test/gmock-internal-utils_test.cc
@@ -250,7 +250,9 @@ TEST(LosslessArithmeticConvertibleTest, FloatingPointToFloatingPoint) {
// Larger size => smaller size is not fine.
EXPECT_FALSE((LosslessArithmeticConvertible<double, float>::value));
+ GTEST_INTENTIONAL_CONST_COND_PUSH_
if (sizeof(double) == sizeof(long double)) { // NOLINT
+ GTEST_INTENTIONAL_CONST_COND_POP_
// In some implementations (e.g. MSVC), double and long double
// have the same size.
EXPECT_TRUE((LosslessArithmeticConvertible<long double, double>::value));