aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGennadiy Civil <gennadiycivil@users.noreply.github.com>2018-03-05 13:21:59 -0500
committerGitHub <noreply@github.com>2018-03-05 13:21:59 -0500
commita7ffeca97406195813604d6f5ea2d834019d9b07 (patch)
tree958da545e95d20a0d41c1ff4b606546d33a23215
parent915c8d051d0a717f8af6559c03e4220e3c39a24c (diff)
parenta518bd5cf27f723cd1c2249287d43e3a7bb016c1 (diff)
downloadgoogletest-a7ffeca97406195813604d6f5ea2d834019d9b07.tar.gz
googletest-a7ffeca97406195813604d6f5ea2d834019d9b07.tar.bz2
googletest-a7ffeca97406195813604d6f5ea2d834019d9b07.zip
Merge pull request #1488 from gennadiycivil/master
Merges
-rw-r--r--googlemock/include/gmock/internal/custom/gmock-matchers.h7
-rw-r--r--googlemock/test/gmock_link_test.h2
-rw-r--r--googletest/include/gtest/internal/gtest-death-test-internal.h20
3 files changed, 17 insertions, 12 deletions
diff --git a/googlemock/include/gmock/internal/custom/gmock-matchers.h b/googlemock/include/gmock/internal/custom/gmock-matchers.h
index f2efef91..fe0d9e84 100644
--- a/googlemock/include/gmock/internal/custom/gmock-matchers.h
+++ b/googlemock/include/gmock/internal/custom/gmock-matchers.h
@@ -33,7 +33,6 @@
//
// Adds google3 callback support to CallableTraits.
//
-#ifndef GMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_CALLBACK_MATCHERS_H_
-#define GMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_CALLBACK_MATCHERS_H_
-
-#endif // GMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_CALLBACK_MATCHERS_H_
+#ifndef GMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_MATCHERS_H_
+#define GMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_MATCHERS_H_
+#endif // GMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_MATCHERS_H_
diff --git a/googlemock/test/gmock_link_test.h b/googlemock/test/gmock_link_test.h
index 5f855d19..06a1cf89 100644
--- a/googlemock/test/gmock_link_test.h
+++ b/googlemock/test/gmock_link_test.h
@@ -90,8 +90,10 @@
// Field
// Property
// ResultOf(function)
+// ResultOf(callback)
// Pointee
// Truly(predicate)
+// AddressSatisfies
// AllOf
// AnyOf
// Not
diff --git a/googletest/include/gtest/internal/gtest-death-test-internal.h b/googletest/include/gtest/internal/gtest-death-test-internal.h
index a9e66106..88e7799c 100644
--- a/googletest/include/gtest/internal/gtest-death-test-internal.h
+++ b/googletest/include/gtest/internal/gtest-death-test-internal.h
@@ -217,14 +217,18 @@ GTEST_API_ bool ExitedUnsuccessfully(int exit_status);
// can be streamed.
// This macro is for implementing ASSERT/EXPECT_DEBUG_DEATH when compiled in
-// NDEBUG mode. In this case we need the statements to be executed, the regex is
-// ignored, and the macro must accept a streamed message even though the message
-// is never printed.
-# define GTEST_EXECUTE_STATEMENT_(statement, regex) \
- GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
- if (::testing::internal::AlwaysTrue()) { \
- GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
- } else \
+// NDEBUG mode. In this case we need the statements to be executed and the macro
+// must accept a streamed message even though the message is never printed.
+// The regex object is not evaluated, but it is used to prevent "unused"
+// warnings and to avoid an expression that doesn't compile in debug mode.
+#define GTEST_EXECUTE_STATEMENT_(statement, regex) \
+ GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
+ if (::testing::internal::AlwaysTrue()) { \
+ GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
+ } else if (!::testing::internal::AlwaysTrue()) { \
+ const ::testing::internal::RE& gtest_regex = (regex); \
+ static_cast<void>(gtest_regex); \
+ } else \
::testing::Message()
// A class representing the parsed contents of the