mirror of
https://github.com/google/googletest.git
synced 2025-01-21 15:11:57 +08:00
Suppress "Conditional expression is constant" warning on Visual Studio.
This commit is contained in:
parent
b5c81098a8
commit
fc4aa1d718
@ -900,7 +900,9 @@ template <typename T1, typename T2>
|
|||||||
// pattern requires the user to use it directly.
|
// pattern requires the user to use it directly.
|
||||||
ConcatImplActionP3<std::string, T1, T2>
|
ConcatImplActionP3<std::string, T1, T2>
|
||||||
Concat(const std::string& a, T1 b, T2 c) {
|
Concat(const std::string& a, T1 b, T2 c) {
|
||||||
|
GTEST_INTENTIONAL_CONST_COND_PUSH_
|
||||||
if (true) {
|
if (true) {
|
||||||
|
GTEST_INTENTIONAL_CONST_COND_POP_
|
||||||
// This branch verifies that ConcatImpl() can be invoked without
|
// This branch verifies that ConcatImpl() can be invoked without
|
||||||
// explicit template arguments.
|
// explicit template arguments.
|
||||||
return ConcatImpl(a, b, c);
|
return ConcatImpl(a, b, c);
|
||||||
|
@ -250,7 +250,9 @@ TEST(LosslessArithmeticConvertibleTest, FloatingPointToFloatingPoint) {
|
|||||||
|
|
||||||
// Larger size => smaller size is not fine.
|
// Larger size => smaller size is not fine.
|
||||||
EXPECT_FALSE((LosslessArithmeticConvertible<double, float>::value));
|
EXPECT_FALSE((LosslessArithmeticConvertible<double, float>::value));
|
||||||
|
GTEST_INTENTIONAL_CONST_COND_PUSH_
|
||||||
if (sizeof(double) == sizeof(long double)) { // NOLINT
|
if (sizeof(double) == sizeof(long double)) { // NOLINT
|
||||||
|
GTEST_INTENTIONAL_CONST_COND_POP_
|
||||||
// In some implementations (e.g. MSVC), double and long double
|
// In some implementations (e.g. MSVC), double and long double
|
||||||
// have the same size.
|
// have the same size.
|
||||||
EXPECT_TRUE((LosslessArithmeticConvertible<long double, double>::value));
|
EXPECT_TRUE((LosslessArithmeticConvertible<long double, double>::value));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user