aboutsummaryrefslogtreecommitdiffstats
path: root/test/gmock-generated-matchers_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test/gmock-generated-matchers_test.cc')
-rw-r--r--test/gmock-generated-matchers_test.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/gmock-generated-matchers_test.cc b/test/gmock-generated-matchers_test.cc
index 819f1a83..b35c4505 100644
--- a/test/gmock-generated-matchers_test.cc
+++ b/test/gmock-generated-matchers_test.cc
@@ -1091,6 +1091,20 @@ TEST(ContainsTest, WorksForTwoDimensionalNativeArray) {
EXPECT_THAT(a, Contains(Not(Contains(5))));
}
+TEST(AllOfTest, HugeMatcher) {
+ // Verify that using AllOf with many arguments doesn't cause
+ // the compiler to exceed template instantiation depth limit.
+ EXPECT_THAT(0, testing::AllOf(_, _, _, _, _, _, _, _, _,
+ testing::AllOf(_, _, _, _, _, _, _, _, _, _)));
+}
+
+TEST(AnyOfTest, HugeMatcher) {
+ // Verify that using AnyOf with many arguments doesn't cause
+ // the compiler to exceed template instantiation depth limit.
+ EXPECT_THAT(0, testing::AnyOf(_, _, _, _, _, _, _, _, _,
+ testing::AnyOf(_, _, _, _, _, _, _, _, _, _)));
+}
+
namespace adl_test {
// Verifies that the implementation of ::testing::AllOf and ::testing::AnyOf