aboutsummaryrefslogtreecommitdiffstats
path: root/include/gmock/gmock-generated-actions.h.pump
diff options
context:
space:
mode:
Diffstat (limited to 'include/gmock/gmock-generated-actions.h.pump')
-rw-r--r--include/gmock/gmock-generated-actions.h.pump10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/gmock/gmock-generated-actions.h.pump b/include/gmock/gmock-generated-actions.h.pump
index 7b042ff8..0c403eb6 100644
--- a/include/gmock/gmock-generated-actions.h.pump
+++ b/include/gmock/gmock-generated-actions.h.pump
@@ -772,4 +772,14 @@ $arg_types_and_names) const
]]
+namespace testing {
+
+// Action Throw(exception) can be used in a mock function of any type
+// to throw the given exception. Any copyable value can be thrown.
+#if GTEST_HAS_EXCEPTIONS
+ACTION_P(Throw, exception) { throw exception; }
+#endif // GTEST_HAS_EXCEPTIONS
+
+} // namespace testing
+
#endif // GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_ACTIONS_H_