From fc4aa1d7188322dc0ad28f2b43b9002d67e86a24 Mon Sep 17 00:00:00 2001 From: kosak Date: Wed, 29 Jan 2014 07:30:13 +0000 Subject: [PATCH] Suppress "Conditional expression is constant" warning on Visual Studio. --- test/gmock-generated-actions_test.cc | 2 ++ test/gmock-internal-utils_test.cc | 2 ++ 2 files changed, 4 insertions(+) diff --git a/test/gmock-generated-actions_test.cc b/test/gmock-generated-actions_test.cc index 31812716..a1fa6aee 100644 --- a/test/gmock-generated-actions_test.cc +++ b/test/gmock-generated-actions_test.cc @@ -900,7 +900,9 @@ template // pattern requires the user to use it directly. ConcatImplActionP3 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 3c78f647..b6a66440 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::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::value));