aboutsummaryrefslogtreecommitdiffstats
path: root/test/gmock-generated-matchers_test.cc
diff options
context:
space:
mode:
authorjgm <jgm@google.com>2012-04-10 16:02:11 +0000
committerjgm <jgm@google.com>2012-04-10 16:02:11 +0000
commit79a367eb217fcd47e2beaf8c0f87fe6d5926f739 (patch)
tree148e73f4c3b6354f900cae94be5e9495e04d7efa /test/gmock-generated-matchers_test.cc
parent9bcb5f9146db42bc38b6bb744fb0cf518a0205be (diff)
downloadgoogletest-79a367eb217fcd47e2beaf8c0f87fe6d5926f739.tar.gz
googletest-79a367eb217fcd47e2beaf8c0f87fe6d5926f739.tar.bz2
googletest-79a367eb217fcd47e2beaf8c0f87fe6d5926f739.zip
Reduced template instantiation depth for the AllOf and AnyOf matchers. Also some formatting changes.
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