googlemock/test/gmock-function-mocker_test.cc
TYPED_TEST(FunctionMockerTest, MocksFunctionsOverloadedOnArgumentType) {
  EXPECT_CALL(this->mock_foo_, OverloadedOnArgumentType(An<int>()))
      .WillOnce(Return(1));
  EXPECT_CALL(this->mock_foo_, OverloadedOnArgumentType(TypedEq<char>('a')))
      .WillOnce(Return('b'));

  EXPECT_EQ(1, this->foo_->OverloadedOnArgumentType(0));
  EXPECT_EQ('b', this->foo_->OverloadedOnArgumentType('a'));
}
// Tests mocking functions overloaded on the types of argument.
Tests mocking functions overloaded on the types of argument.
Tests mocking functions overloaded on the types of argument .
TYPED_TEST(FunctionMockerTest, MocksFunctionsOverloadedOnArgumentType) {
  EXPECT_CALL(this->mock_foo_, OverloadedOnArgumentType(An<int>()))
      .WillOnce(Return(1));
  EXPECT_CALL(this->mock_foo_, OverloadedOnArgumentType(TypedEq<char>('a')))
      .WillOnce(Return('b'));
  EXPECT_EQ(1, this->foo_->OverloadedOnArgumentType(0));
  EXPECT_EQ('b', this->foo_->OverloadedOnArgumentType('a'));
}
TYPED_TEST ( FunctionMockerTest , MocksFunctionsOverloadedOnArgumentType ) { EXPECT_CALL ( this -> mock_foo_ , OverloadedOnArgumentType ( An < int > ( ) ) ) . WillOnce ( Return ( 1 ) ) ; EXPECT_CALL ( this -> mock_foo_ , OverloadedOnArgumentType ( TypedEq < char > ( ' ' ) ) ) . WillOnce ( Return ( ' ' ) ) ; EXPECT_EQ ( 1 , this -> foo_ -> OverloadedOnArgumentType ( 0 ) ) ; EXPECT_EQ ( ' ' , this -> foo_ -> OverloadedOnArgumentType ( ' ' ) ) ; }
Tests mocking functions overloaded on the types of argument.
Tests mocking functions overloaded on the types of argument .