Home | History | Annotate | Download | only in gmock

Lines Matching refs:Cardinality

1990 // To implement a cardinality Foo, define:
1993 // 2. a factory function that creates a Cardinality object from a
1998 // management as Cardinality objects can now be copied like plain values.
2000 // The implementation of a cardinality.
2010 // Returns true iff call_count calls will satisfy this cardinality.
2013 // Returns true iff call_count calls will saturate this cardinality.
2020 // A Cardinality is a copyable and IMMUTABLE (except by assignment)
2022 // be called. The implementation of Cardinality is just a linked_ptr
2024 // Don't inherit from Cardinality!
2025 class Cardinality {
2027 // Constructs a null cardinality. Needed for storing Cardinality
2029 Cardinality() {}
2031 // Constructs a Cardinality from its implementation.
2032 explicit Cardinality(const CardinalityInterface* impl) : impl_(impl) {}
2039 // Returns true iff call_count calls will satisfy this cardinality.
2044 // Returns true iff call_count calls will saturate this cardinality.
2050 // cardinality, i.e. exceed the maximum number of allowed calls.
2066 // Creates a cardinality that allows at least n calls.
2067 Cardinality AtLeast(int n);
2069 // Creates a cardinality that allows at most n calls.
2070 Cardinality AtMost(int n);
2072 // Creates a cardinality that allows any number of calls.
2073 Cardinality AnyNumber();
2075 // Creates a cardinality that allows between min and max calls.
2076 Cardinality Between(int min, int max);
2078 // Creates a cardinality that allows exactly n calls.
2079 Cardinality Exactly(int n);
2081 // Creates a cardinality from its implementation.
2082 inline Cardinality MakeCardinality(const CardinalityInterface* c) {
2083 return Cardinality(c);
4597 // .Times(cardinality)
8292 // Returns the cardinality specified in the expectation spec.
8293 const Cardinality& cardinality() const { return cardinality_; }
8341 // Explicitly specifies the cardinality of this expectation. Used
8343 void SpecifyCardinality(const Cardinality& cardinality);
8345 // Returns true iff the user specified the cardinality explicitly
8349 // Sets the cardinality of this expectation spec.
8350 void set_cardinality(const Cardinality& a_cardinality) {
8380 return cardinality().IsSatisfiedByCallCount(call_count_);
8387 return cardinality().IsSaturatedByCallCount(call_count_);
8394 return cardinality().IsOverSaturatedByCallCount(call_count_);
8420 // WillRepeatedly() clauses) against the cardinality if this hasn't
8433 void UntypedTimes(const Cardinality& a_cardinality);
8440 // True iff the cardinality is specified explicitly.
8442 Cardinality cardinality_; // The cardinality of the expectation.
8516 TypedExpectation& Times(const Cardinality& a_cardinality) {