googlemock/test/gmock-function-mocker_test.cc
TYPED_TEST(FunctionMockerTest, MocksFunctionsOverloadedOnConstnessOfThis) {
  EXPECT_CALL(this->mock_foo_, OverloadedOnConstness());
  EXPECT_CALL(Const(this->mock_foo_), OverloadedOnConstness())
      .WillOnce(Return('a'));

  EXPECT_EQ(0, this->foo_->OverloadedOnConstness());
  EXPECT_EQ('a', Const(*this->foo_).OverloadedOnConstness());
}
// Tests mocking functions overloaded on the const-ness of this object.
Tests mocking functions overloaded on the const-ness of this object.
Tests mocking functions overloaded on the const - ness of this object .
TYPED_TEST(FunctionMockerTest, MocksFunctionsOverloadedOnConstnessOfThis) {
  EXPECT_CALL(this->mock_foo_, OverloadedOnConstness());
  EXPECT_CALL(Const(this->mock_foo_), OverloadedOnConstness())
      .WillOnce(Return('a'));
  EXPECT_EQ(0, this->foo_->OverloadedOnConstness());
  EXPECT_EQ('a', Const(*this->foo_).OverloadedOnConstness());
}
TYPED_TEST ( FunctionMockerTest , MocksFunctionsOverloadedOnConstnessOfThis ) { EXPECT_CALL ( this -> mock_foo_ , OverloadedOnConstness ( ) ) ; EXPECT_CALL ( Const ( this -> mock_foo_ ) , OverloadedOnConstness ( ) ) . WillOnce ( Return ( ' ' ) ) ; EXPECT_EQ ( 0 , this -> foo_ -> OverloadedOnConstness ( ) ) ; EXPECT_EQ ( ' ' , Const ( * this -> foo_ ) . OverloadedOnConstness ( ) ) ; }
Tests mocking functions overloaded on the const-ness of this object.
Tests mocking functions overloaded on the const - ness of this object .