summaryrefslogtreecommitdiffstats
path: root/googletest/include/gtest/gtest.h
diff options
context:
space:
mode:
authorDavid Mott <mott.david.j@gmail.com>2016-06-25 20:41:19 (GMT)
committerDavid Mott <mott.david.j@gmail.com>2016-06-25 20:41:19 (GMT)
commite35015f5390458c3bf56538c9f01f64b8bed828b (patch)
treeeae440abe878ffe211251ba46ec9fa1794c1c64d /googletest/include/gtest/gtest.h
parent0a439623f75c029912728d80cb7f1b8b48739ca4 (diff)
downloadgoogletest-e35015f5390458c3bf56538c9f01f64b8bed828b.zip
googletest-e35015f5390458c3bf56538c9f01f64b8bed828b.tar.gz
googletest-e35015f5390458c3bf56538c9f01f64b8bed828b.tar.bz2
fix to operator precedence in GTEST_TEST_BOOLEAN_ with expressions that implement operator bool
Diffstat (limited to 'googletest/include/gtest/gtest.h')
-rw-r--r--googletest/include/gtest/gtest.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/googletest/include/gtest/gtest.h b/googletest/include/gtest/gtest.h
index 9efba75..f846c5b 100644
--- a/googletest/include/gtest/gtest.h
+++ b/googletest/include/gtest/gtest.h
@@ -1857,13 +1857,13 @@ class TestWithParam : public Test, public WithParamInterface<T> {
// AssertionResult. For more information on how to use AssertionResult with
// these macros see comments on that class.
#define EXPECT_TRUE(condition) \
- GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
+ GTEST_TEST_BOOLEAN_((condition), #condition, false, true, \
GTEST_NONFATAL_FAILURE_)
#define EXPECT_FALSE(condition) \
GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
GTEST_NONFATAL_FAILURE_)
#define ASSERT_TRUE(condition) \
- GTEST_TEST_BOOLEAN_(condition, #condition, false, true, \
+ GTEST_TEST_BOOLEAN_((condition), #condition, false, true, \
GTEST_FATAL_FAILURE_)
#define ASSERT_FALSE(condition) \
GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \