aboutsummaryrefslogtreecommitdiffstats
path: root/googlemock/test
diff options
context:
space:
mode:
authormisterg <misterg@google.com>2018-10-09 16:26:28 -0400
committerGennadiy Civil <misterg@google.com>2018-10-09 16:30:37 -0400
commit78761b58fc9ae65acaebb6a9e34087e593c89c93 (patch)
tree73491fccf4e7173a4d7afe0a7b191fb507222e17 /googlemock/test
parent7d3b73c85a42811309eac26e5cbe054c40b64785 (diff)
downloadgoogletest-78761b58fc9ae65acaebb6a9e34087e593c89c93.tar.gz
googletest-78761b58fc9ae65acaebb6a9e34087e593c89c93.tar.bz2
googletest-78761b58fc9ae65acaebb6a9e34087e593c89c93.zip
Remove non-variadic pre C++11 AnyOf
PiperOrigin-RevId: 216411381
Diffstat (limited to 'googlemock/test')
-rw-r--r--googlemock/test/gmock-matchers_test.cc42
1 files changed, 16 insertions, 26 deletions
diff --git a/googlemock/test/gmock-matchers_test.cc b/googlemock/test/gmock-matchers_test.cc
index 86ff580a..f4e9e9f7 100644
--- a/googlemock/test/gmock-matchers_test.cc
+++ b/googlemock/test/gmock-matchers_test.cc
@@ -2790,28 +2790,22 @@ TEST(ElementsAreTest, HugeMatcherUnordered) {
TEST(AnyOfTest, CanDescribeSelf) {
Matcher<int> m;
m = AnyOf(Le(1), Ge(3));
+
EXPECT_EQ("(is <= 1) or (is >= 3)",
Describe(m));
m = AnyOf(Lt(0), Eq(1), Eq(2));
- EXPECT_EQ("(is < 0) or "
- "((is equal to 1) or (is equal to 2))",
- Describe(m));
+ EXPECT_EQ("(is < 0) or (is equal to 1) or (is equal to 2)", Describe(m));
m = AnyOf(Lt(0), Eq(1), Eq(2), Eq(3));
- EXPECT_EQ("((is < 0) or "
- "(is equal to 1)) or "
- "((is equal to 2) or "
- "(is equal to 3))",
+ EXPECT_EQ("(is < 0) or (is equal to 1) or (is equal to 2) or (is equal to 3)",
Describe(m));
m = AnyOf(Le(0), Gt(10), 3, 5, 7);
- EXPECT_EQ("((is <= 0) or "
- "(is > 10)) or "
- "((is equal to 3) or "
- "((is equal to 5) or "
- "(is equal to 7)))",
- Describe(m));
+ EXPECT_EQ(
+ "(is <= 0) or (is > 10) or (is equal to 3) or (is equal to 5) or (is "
+ "equal to 7)",
+ Describe(m));
}
// Tests that AnyOf(m1, ..., mn) describes its negation properly.
@@ -2822,24 +2816,20 @@ TEST(AnyOfTest, CanDescribeNegation) {
DescribeNegation(m));
m = AnyOf(Lt(0), Eq(1), Eq(2));
- EXPECT_EQ("(isn't < 0) and "
- "((isn't equal to 1) and (isn't equal to 2))",
+ EXPECT_EQ("(isn't < 0) and (isn't equal to 1) and (isn't equal to 2)",
DescribeNegation(m));
m = AnyOf(Lt(0), Eq(1), Eq(2), Eq(3));
- EXPECT_EQ("((isn't < 0) and "
- "(isn't equal to 1)) and "
- "((isn't equal to 2) and "
- "(isn't equal to 3))",
- DescribeNegation(m));
+ EXPECT_EQ(
+ "(isn't < 0) and (isn't equal to 1) and (isn't equal to 2) and (isn't "
+ "equal to 3)",
+ DescribeNegation(m));
m = AnyOf(Le(0), Gt(10), 3, 5, 7);
- EXPECT_EQ("((isn't <= 0) and "
- "(isn't > 10)) and "
- "((isn't equal to 3) and "
- "((isn't equal to 5) and "
- "(isn't equal to 7)))",
- DescribeNegation(m));
+ EXPECT_EQ(
+ "(isn't <= 0) and (isn't > 10) and (isn't equal to 3) and (isn't equal "
+ "to 5) and (isn't equal to 7)",
+ DescribeNegation(m));
}
// Tests that monomorphic matchers are safely cast by the AnyOf matcher.