Lines Matching refs:Cardinality
48 // To implement a cardinality Foo, define:
51 // 2. a factory function that creates a Cardinality object from a
56 // management as Cardinality objects can now be copied like plain values.
58 // The implementation of a cardinality.
68 // Returns true iff call_count calls will satisfy this cardinality.
71 // Returns true iff call_count calls will saturate this cardinality.
78 // A Cardinality is a copyable and IMMUTABLE (except by assignment)
80 // be called. The implementation of Cardinality is just a linked_ptr
82 // Don't inherit from Cardinality!
83 class GTEST_API_ Cardinality {
85 // Constructs a null cardinality. Needed for storing Cardinality
87 Cardinality() {}
89 // Constructs a Cardinality from its implementation.
90 explicit Cardinality(const CardinalityInterface* impl) : impl_(impl) {}
97 // Returns true iff call_count calls will satisfy this cardinality.
102 // Returns true iff call_count calls will saturate this cardinality.
108 // cardinality, i.e. exceed the maximum number of allowed calls.
125 // Creates a cardinality that allows at least n calls.
126 GTEST_API_ Cardinality AtLeast(int n);
128 // Creates a cardinality that allows at most n calls.
129 GTEST_API_ Cardinality AtMost(int n);
131 // Creates a cardinality that allows any number of calls.
132 GTEST_API_ Cardinality AnyNumber();
134 // Creates a cardinality that allows between min and max calls.
135 GTEST_API_ Cardinality Between(int min, int max);
137 // Creates a cardinality that allows exactly n calls.
138 GTEST_API_ Cardinality Exactly(int n);
140 // Creates a cardinality from its implementation.
141 inline Cardinality MakeCardinality(const CardinalityInterface* c) {
142 return Cardinality(c);