Lines Matching refs:AnyOf

601 // Helper to allow easy testing of AnyOf matchers with num parameters.
623 // Tests that AnyOf(m1, ..., mn) matches any value that matches at
627 m = AnyOf(Le(1), Ge(3));
632 m = AnyOf(Lt(0), Eq(1), Eq(2));
638 m = AnyOf(Lt(0), Eq(1), Eq(2), Eq(3));
645 m = AnyOf(Le(0), Gt(10), 3, 5, 7);
655 AnyOfMatches(2, AnyOf(1, 2));
656 AnyOfMatches(3, AnyOf(1, 2, 3));
657 AnyOfMatches(4, AnyOf(1, 2, 3, 4));
658 AnyOfMatches(5, AnyOf(1, 2, 3, 4, 5));
659 AnyOfMatches(6, AnyOf(1, 2, 3, 4, 5, 6));
660 AnyOfMatches(7, AnyOf(1, 2, 3, 4, 5, 6, 7));
661 AnyOfMatches(8, AnyOf(1, 2, 3, 4, 5, 6, 7, 8));
662 AnyOfMatches(9, AnyOf(1, 2, 3, 4, 5, 6, 7, 8, 9));
663 AnyOfMatches(10, AnyOf(1, 2, 3, 4, 5, 6, 7, 8, 9, 10));
668 // Also make sure AnyOf is defined in the right namespace and does not depend
670 Matcher<int> m = ::testing::AnyOf(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11);
674 AnyOfMatches(50, AnyOf(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
679 50, AnyOf("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12",
714 // Tests that AnyOf(m1, ..., mn) describes itself properly.
717 m = AnyOf(Le(1), Ge(3));
721 m = AnyOf(Lt(0), Eq(1), Eq(2));
724 m = AnyOf(Lt(0), Eq(1), Eq(2), Eq(3));
728 m = AnyOf(Le(0), Gt(10), 3, 5, 7);
735 // Tests that AnyOf(m1, ..., mn) describes its negation properly.
738 m = AnyOf(Le(1), Ge(3));
741 m = AnyOf(Lt(0), Eq(1), Eq(2));
745 m = AnyOf(Lt(0), Eq(1), Eq(2), Eq(3));
751 m = AnyOf(Le(0), Gt(10), 3, 5, 7);
758 // Tests that monomorphic matchers are safely cast by the AnyOf matcher.
764 Matcher<const int&> m = AnyOf(greater_than_5, less_than_10);
765 Matcher<int&> m2 = AnyOf(greater_than_5, less_than_10);
766 Matcher<int&> m3 = AnyOf(greater_than_5, m2);
769 Matcher<const int&> m4 = AnyOf(greater_than_5, less_than_10, less_than_10);
770 Matcher<int&> m5 = AnyOf(greater_than_5, less_than_10, less_than_10);
779 m = AnyOf(GreaterThan(10), Lt(0));
783 m = AnyOf(GreaterThan(10), GreaterThan(20));
789 m = AnyOf(GreaterThan(10), Gt(20), GreaterThan(30));
794 m = AnyOf(GreaterThan(10), GreaterThan(20), GreaterThan(30));
802 m = AnyOf(GreaterThan(10), GreaterThan(20));
808 m = AnyOf(GreaterThan(10), Lt(30));
813 m = AnyOf(GreaterThan(30), GreaterThan(20));
1457 // Verify that using AnyOf with many arguments doesn't cause
1459 EXPECT_THAT(0, testing::AnyOf(_, _, _, _, _, _, _, _, _,
1460 testing::AnyOf(_, _, _, _, _, _, _, _, _, _)));
1465 // Verifies that the implementation of ::testing::AllOf and ::testing::AnyOf
1467 // name lookup will cause AllOf/AnyOf in the 'adl_test' namespace to be found
1470 // The matcher must be in the same namespace as AllOf/AnyOf to make argument
1488 bool AnyOf(const T1&, const T2&) {
1494 testing::AnyOf(M(), M(), M(), M(), M(), M(), M(), M(), M(), M()));
1507 EXPECT_THAT(p, AnyOf(Pointee(Eq(5)), Pointee(Lt(0)), Pointee(Lt(5))));
1508 EXPECT_THAT(p, Not(AnyOf(Pointee(Eq(5)), Pointee(Lt(0)), Pointee(Gt(5)))));