proxygen
testing::Cardinality Class Reference

#include <gmock-cardinalities.h>

Public Member Functions

 Cardinality ()
 
 Cardinality (const CardinalityInterface *impl)
 
int ConservativeLowerBound () const
 
int ConservativeUpperBound () const
 
bool IsSatisfiedByCallCount (int call_count) const
 
bool IsSaturatedByCallCount (int call_count) const
 
bool IsOverSaturatedByCallCount (int call_count) const
 
void DescribeTo (::std::ostream *os) const
 
 Cardinality ()
 
 Cardinality (const CardinalityInterface *impl)
 
int ConservativeLowerBound () const
 
int ConservativeUpperBound () const
 
bool IsSatisfiedByCallCount (int call_count) const
 
bool IsSaturatedByCallCount (int call_count) const
 
bool IsOverSaturatedByCallCount (int call_count) const
 
void DescribeTo (::std::ostream *os) const
 
 Cardinality ()
 
 Cardinality (const CardinalityInterface *impl)
 
int ConservativeLowerBound () const
 
int ConservativeUpperBound () const
 
bool IsSatisfiedByCallCount (int call_count) const
 
bool IsSaturatedByCallCount (int call_count) const
 
bool IsOverSaturatedByCallCount (int call_count) const
 
void DescribeTo (::std::ostream *os) const
 

Static Public Member Functions

static void DescribeActualCallCountTo (int actual_call_count,::std::ostream *os)
 
static void DescribeActualCallCountTo (int actual_call_count,::std::ostream *os)
 
static void DescribeActualCallCountTo (int actual_call_count,::std::ostream *os)
 

Private Attributes

internal::linked_ptr< const CardinalityInterfaceimpl_
 

Detailed Description

Definition at line 83 of file gmock-cardinalities.h.

Constructor & Destructor Documentation

testing::Cardinality::Cardinality ( )
inline

Definition at line 87 of file gmock-cardinalities.h.

87 {}
testing::Cardinality::Cardinality ( const CardinalityInterface impl)
inlineexplicit

Definition at line 90 of file gmock-cardinalities.h.

90 : impl_(impl) {}
internal::linked_ptr< const CardinalityInterface > impl_
testing::Cardinality::Cardinality ( )
inline

Definition at line 87 of file gmock-cardinalities.h.

87 {}
testing::Cardinality::Cardinality ( const CardinalityInterface impl)
inlineexplicit

Definition at line 90 of file gmock-cardinalities.h.

90 : impl_(impl) {}
internal::linked_ptr< const CardinalityInterface > impl_
testing::Cardinality::Cardinality ( )
inline

Definition at line 87 of file gmock-cardinalities.h.

87 {}
testing::Cardinality::Cardinality ( const CardinalityInterface impl)
inlineexplicit

Definition at line 90 of file gmock-cardinalities.h.

90 : impl_(impl) {}
internal::linked_ptr< const CardinalityInterface > impl_

Member Function Documentation

int testing::Cardinality::ConservativeLowerBound ( ) const
inline

Definition at line 94 of file gmock-cardinalities.h.

Referenced by testing::internal::ExpectationBase::CheckActionCountIfNotDone().

94 { return impl_->ConservativeLowerBound(); }
internal::linked_ptr< const CardinalityInterface > impl_
int testing::Cardinality::ConservativeLowerBound ( ) const
inline

Definition at line 94 of file gmock-cardinalities.h.

94 { return impl_->ConservativeLowerBound(); }
internal::linked_ptr< const CardinalityInterface > impl_
int testing::Cardinality::ConservativeLowerBound ( ) const
inline

Definition at line 94 of file gmock-cardinalities.h.

94 { return impl_->ConservativeLowerBound(); }
internal::linked_ptr< const CardinalityInterface > impl_
int testing::Cardinality::ConservativeUpperBound ( ) const
inline

Definition at line 95 of file gmock-cardinalities.h.

Referenced by testing::internal::ExpectationBase::CheckActionCountIfNotDone().

95 { return impl_->ConservativeUpperBound(); }
internal::linked_ptr< const CardinalityInterface > impl_
int testing::Cardinality::ConservativeUpperBound ( ) const
inline

Definition at line 95 of file gmock-cardinalities.h.

95 { return impl_->ConservativeUpperBound(); }
internal::linked_ptr< const CardinalityInterface > impl_
int testing::Cardinality::ConservativeUpperBound ( ) const
inline

Definition at line 95 of file gmock-cardinalities.h.

95 { return impl_->ConservativeUpperBound(); }
internal::linked_ptr< const CardinalityInterface > impl_
static void testing::Cardinality::DescribeActualCallCountTo ( int  actual_call_count,
::std::ostream *  os 
)
static
void testing::Cardinality::DescribeActualCallCountTo ( int  actual_call_count,
::std::ostream *  os 
)
static

Definition at line 130 of file gmock-cardinalities.cc.

Referenced by testing::internal::ExpectationBase::DescribeCallCountTo().

131  {
132  if (actual_call_count > 0) {
133  *os << "called " << FormatTimes(actual_call_count);
134  } else {
135  *os << "never called";
136  }
137 }
static void testing::Cardinality::DescribeActualCallCountTo ( int  actual_call_count,
::std::ostream *  os 
)
static
void testing::Cardinality::DescribeTo ( ::std::ostream *  os) const
inline

Definition at line 115 of file gmock-cardinalities.h.

References testing::AnyNumber(), testing::AtLeast(), testing::AtMost(), testing::Between(), c, testing::Exactly(), GTEST_API_, testing::MakeCardinality(), max, and min.

115 { impl_->DescribeTo(os); }
internal::linked_ptr< const CardinalityInterface > impl_
void testing::Cardinality::DescribeTo ( ::std::ostream *  os) const
inline

Definition at line 115 of file gmock-cardinalities.h.

References testing::AnyNumber(), testing::AtLeast(), testing::AtMost(), testing::Between(), c, testing::Exactly(), GTEST_API_, testing::MakeCardinality(), max, and min.

115 { impl_->DescribeTo(os); }
internal::linked_ptr< const CardinalityInterface > impl_
void testing::Cardinality::DescribeTo ( ::std::ostream *  os) const
inline

Definition at line 115 of file gmock-cardinalities.h.

Referenced by testing::internal::ExpectationBase::CheckActionCountIfNotDone(), and testing::internal::ExpectationBase::DescribeCallCountTo().

115 { impl_->DescribeTo(os); }
internal::linked_ptr< const CardinalityInterface > impl_
bool testing::Cardinality::IsOverSaturatedByCallCount ( int  call_count) const
inline

Definition at line 109 of file gmock-cardinalities.h.

Referenced by testing::internal::ExpectationBase::IsOverSaturated().

109  {
110  return impl_->IsSaturatedByCallCount(call_count) &&
111  !impl_->IsSatisfiedByCallCount(call_count);
112  }
internal::linked_ptr< const CardinalityInterface > impl_
bool testing::Cardinality::IsOverSaturatedByCallCount ( int  call_count) const
inline

Definition at line 109 of file gmock-cardinalities.h.

109  {
110  return impl_->IsSaturatedByCallCount(call_count) &&
111  !impl_->IsSatisfiedByCallCount(call_count);
112  }
internal::linked_ptr< const CardinalityInterface > impl_
bool testing::Cardinality::IsOverSaturatedByCallCount ( int  call_count) const
inline

Definition at line 109 of file gmock-cardinalities.h.

109  {
110  return impl_->IsSaturatedByCallCount(call_count) &&
111  !impl_->IsSatisfiedByCallCount(call_count);
112  }
internal::linked_ptr< const CardinalityInterface > impl_
bool testing::Cardinality::IsSatisfiedByCallCount ( int  call_count) const
inline

Definition at line 98 of file gmock-cardinalities.h.

98  {
99  return impl_->IsSatisfiedByCallCount(call_count);
100  }
internal::linked_ptr< const CardinalityInterface > impl_
bool testing::Cardinality::IsSatisfiedByCallCount ( int  call_count) const
inline

Definition at line 98 of file gmock-cardinalities.h.

98  {
99  return impl_->IsSatisfiedByCallCount(call_count);
100  }
internal::linked_ptr< const CardinalityInterface > impl_
bool testing::Cardinality::IsSatisfiedByCallCount ( int  call_count) const
inline

Definition at line 98 of file gmock-cardinalities.h.

Referenced by testing::internal::ExpectationBase::IsSatisfied().

98  {
99  return impl_->IsSatisfiedByCallCount(call_count);
100  }
internal::linked_ptr< const CardinalityInterface > impl_
bool testing::Cardinality::IsSaturatedByCallCount ( int  call_count) const
inline

Definition at line 103 of file gmock-cardinalities.h.

103  {
104  return impl_->IsSaturatedByCallCount(call_count);
105  }
internal::linked_ptr< const CardinalityInterface > impl_
bool testing::Cardinality::IsSaturatedByCallCount ( int  call_count) const
inline

Definition at line 103 of file gmock-cardinalities.h.

Referenced by testing::internal::ExpectationBase::IsSaturated().

103  {
104  return impl_->IsSaturatedByCallCount(call_count);
105  }
internal::linked_ptr< const CardinalityInterface > impl_
bool testing::Cardinality::IsSaturatedByCallCount ( int  call_count) const
inline

Definition at line 103 of file gmock-cardinalities.h.

103  {
104  return impl_->IsSaturatedByCallCount(call_count);
105  }
internal::linked_ptr< const CardinalityInterface > impl_

Member Data Documentation

internal::linked_ptr< const CardinalityInterface > testing::Cardinality::impl_
private

Definition at line 122 of file gmock-cardinalities.h.


The documentation for this class was generated from the following files: