proxygen
testing::Sequence Class Reference

#include <gmock-spec-builders.h>

Public Member Functions

 Sequence ()
 
void AddExpectation (const Expectation &expectation) const
 
 Sequence ()
 
void AddExpectation (const Expectation &expectation) const
 
 Sequence ()
 
void AddExpectation (const Expectation &expectation) const
 

Private Attributes

internal::linked_ptr< Expectationlast_expectation_
 

Detailed Description

Definition at line 619 of file gmock-spec-builders.h.

Constructor & Destructor Documentation

testing::Sequence::Sequence ( )
inline

Definition at line 622 of file gmock-spec-builders.h.

622 : last_expectation_(new Expectation) {}
internal::linked_ptr< Expectation > last_expectation_
testing::Sequence::Sequence ( )
inline
testing::Sequence::Sequence ( )
inline

Member Function Documentation

void testing::Sequence::AddExpectation ( const Expectation expectation) const

Definition at line 794 of file gmock-spec-builders.cc.

References testing::Expectation::expectation_base(), and testing::internal::ExpectationBase::immediate_prerequisites_.

Referenced by testing::internal::FunctionMockerBase< R(A1, A2)>::AddNewExpectation(), and testing::internal::TypedExpectation< F >::InSequence().

794  {
795  if (*last_expectation_ != expectation) {
796  if (last_expectation_->expectation_base() != NULL) {
797  expectation.expectation_base()->immediate_prerequisites_
798  += *last_expectation_;
799  }
800  *last_expectation_ = expectation;
801  }
802 }
internal::linked_ptr< Expectation > last_expectation_
void testing::Sequence::AddExpectation ( const Expectation expectation) const
void testing::Sequence::AddExpectation ( const Expectation expectation) const

Member Data Documentation

internal::linked_ptr< Expectation > testing::Sequence::last_expectation_
private

Definition at line 633 of file gmock-spec-builders.h.


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