Add missing const in GTEST_TEST_BOOLEAN_.
Dropping this causes tools like [misc-const-correctness](http://clang.llvm.org/extra/clang-tidy/checks/misc/const-correctness.html) to flag GTEST macro invocations as non-const-correct. PiperOrigin-RevId: 958710143 Change-Id: I0f28c4bfc581e5dc9faa9158c4a0792ff546533e
This commit is contained in:
committed by
Copybara-Service
parent
51725d1111
commit
5f9ad7d401
@@ -1451,13 +1451,13 @@ class [[nodiscard]] NeverThrown {
|
||||
// Implements Boolean test assertions such as EXPECT_TRUE. expression can be
|
||||
// either a boolean expression or an AssertionResult. text is a textual
|
||||
// representation of expression as it was passed into the EXPECT_TRUE.
|
||||
#define GTEST_TEST_BOOLEAN_(expression, text, actual, expected, fail) \
|
||||
GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
|
||||
if (::testing::internal::AssertionResultExpectation gtest_are_ = { \
|
||||
::testing::AssertionResult(expression), expected}) \
|
||||
; \
|
||||
else \
|
||||
fail(::testing::internal::GetBoolAssertionFailureMessage( \
|
||||
#define GTEST_TEST_BOOLEAN_(expression, text, actual, expected, fail) \
|
||||
GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
|
||||
if (const ::testing::internal::AssertionResultExpectation gtest_are_ = { \
|
||||
::testing::AssertionResult(expression), expected}) \
|
||||
; \
|
||||
else /* NOLINT */ \
|
||||
fail(::testing::internal::GetBoolAssertionFailureMessage( \
|
||||
gtest_are_.assertion_result, text, #actual, #expected))
|
||||
|
||||
#define GTEST_TEST_NO_FATAL_FAILURE_(statement, fail) \
|
||||
|
||||
Reference in New Issue
Block a user