Lines Matching refs:Property
122 using testing::Property;
3396 // A user-defined class for testing Property().
3422 // A derived class for testing Property().
3428 // Tests that Property(&Foo::property, ...) works when property()
3431 Matcher<const AClass&> m = Property(&AClass::n, Ge(0));
3441 // Tests that Property(&Foo::property, ...) works when property()
3444 Matcher<const AClass&> m = Property(&AClass::s, StartsWith("hi"));
3454 // Tests that Property(&Foo::property, ...) works when property()
3460 Matcher<const AClass&> m = Property(&AClass::x, Ref(x));
3463 m = Property(&AClass::x, Not(Ref(x)));
3467 // Tests that Property(&Foo::property, ...) works when the argument is
3470 Matcher<AClass> m = Property(&AClass::s, StartsWith("hi"));
3480 // Tests that Property(&Foo::property, ...) works when the argument's
3483 // The matcher expects a DerivedClass, but inside the Property() we
3485 Matcher<const DerivedClass&> m = Property(&AClass::n, Ge(0));
3495 // Tests that Property(&Foo::property, m) works when property()'s type
3499 Matcher<const AClass&> m = Property(&AClass::n,
3508 // Tests that Property() can describe itself.
3510 Matcher<const AClass&> m = Property(&AClass::n, Ge(0));
3512 EXPECT_EQ("is an object whose given property is >= 0", Describe(m));
3513 EXPECT_EQ("is an object whose given property isn't >= 0",
3517 // Tests that Property() can explain the match result.
3519 Matcher<const AClass&> m = Property(&AClass::n, Ge(0));
3523 EXPECT_EQ("whose given property is 1" + OfType("int"), Explain(m, a));
3525 m = Property(&AClass::n, GreaterThan(0));
3527 "whose given property is 1" + OfType("int") + ", which is 1 more than 0",
3531 // Tests that Property() works when the argument is a pointer to const.
3533 Matcher<const AClass*> m = Property(&AClass::n, Ge(0));
3543 // Tests that Property() works when the argument is a pointer to non-const.
3545 Matcher<AClass*> m = Property(&AClass::s, StartsWith("hi"));
3555 // Tests that Property() works when the argument is a reference to a
3558 Matcher<AClass* const&> m = Property(&AClass::s, StartsWith("hi"));
3568 // Tests that Property() does not match the NULL pointer.
3570 Matcher<const AClass*> m = Property(&AClass::x, _);
3574 // Tests that Property(&Foo::property, ...) works when the argument's
3577 // The matcher expects a DerivedClass, but inside the Property() we
3579 Matcher<const DerivedClass*> m = Property(&AClass::n, Ge(0));
3589 // Tests that Property() can describe itself when used to match a pointer.
3591 Matcher<const AClass*> m = Property(&AClass::n, Ge(0));
3593 EXPECT_EQ("is an object whose given property is >= 0", Describe(m));
3594 EXPECT_EQ("is an object whose given property isn't >= 0",
3598 // Tests that Property() can explain the result of matching a pointer.
3600 Matcher<const AClass*> m = Property(&AClass::n, Ge(0));
3606 "which points to an object whose given property is 1" + OfType("int"),
3609 Property(&AClass::n, GreaterThan(0));
3610 EXPECT_EQ("which points to an object whose given property is 1" +