Merge pull request #808 from djmott/master
fix to operator precedence in GTEST_TEST_BOOLEAN_ with expressions th…
This commit is contained in:
		
						commit
						8d6a2eec1a
					
				@ -1857,13 +1857,13 @@ class TestWithParam : public Test, public WithParamInterface<T> {
 | 
				
			|||||||
// AssertionResult. For more information on how to use AssertionResult with
 | 
					// AssertionResult. For more information on how to use AssertionResult with
 | 
				
			||||||
// these macros see comments on that class.
 | 
					// these macros see comments on that class.
 | 
				
			||||||
#define EXPECT_TRUE(condition) \
 | 
					#define EXPECT_TRUE(condition) \
 | 
				
			||||||
  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
 | 
					  GTEST_TEST_BOOLEAN_(!!(condition), #condition, false, true, \
 | 
				
			||||||
                      GTEST_NONFATAL_FAILURE_)
 | 
					                      GTEST_NONFATAL_FAILURE_)
 | 
				
			||||||
#define EXPECT_FALSE(condition) \
 | 
					#define EXPECT_FALSE(condition) \
 | 
				
			||||||
  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
 | 
					  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
 | 
				
			||||||
                      GTEST_NONFATAL_FAILURE_)
 | 
					                      GTEST_NONFATAL_FAILURE_)
 | 
				
			||||||
#define ASSERT_TRUE(condition) \
 | 
					#define ASSERT_TRUE(condition) \
 | 
				
			||||||
  GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
 | 
					  GTEST_TEST_BOOLEAN_(!!(condition), #condition, false, true, \
 | 
				
			||||||
                      GTEST_FATAL_FAILURE_)
 | 
					                      GTEST_FATAL_FAILURE_)
 | 
				
			||||||
#define ASSERT_FALSE(condition) \
 | 
					#define ASSERT_FALSE(condition) \
 | 
				
			||||||
  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
 | 
					  GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user