114 #ifndef GMOCK_TEST_GMOCK_LINK_TEST_H_
115 #define GMOCK_TEST_GMOCK_LINK_TEST_H_
119 #if !GTEST_OS_WINDOWS_MOBILE
148 using testing::InvokeArgument;
168 using testing::SetArrayArgument;
180 #if !GTEST_OS_WINDOWS_MOBILE
184 #if GTEST_HAS_EXCEPTIONS
185 using testing::Throw;
289 EXPECT_CALL(mock, VoidFromString(
_)).WillOnce(SetArgPointee<0>(
'y'));
299 EXPECT_CALL(mock, VoidFromString(
_)).WillOnce(SetArrayArgument<0>(&ch2,
304 #if !GTEST_OS_WINDOWS_MOBILE
310 int saved_errno = errno;
316 #endif // !GTEST_OS_WINDOWS_MOBILE
348 EXPECT_CALL(mock, VoidFromFunc(
_)).WillOnce(InvokeArgument<0>(&ch));
406 #if GTEST_HAS_EXCEPTIONS
411 EXPECT_CALL(mock, VoidFromString(
_)).WillOnce(Throw(42));
414 #endif // GTEST_HAS_EXCEPTIONS
422 # pragma warning(push)
423 # pragma warning(disable:4100)
428 ACTION(Return1) {
return 1; }
434 EXPECT_CALL(mock, IntFromString(
_)).WillOnce(Return1());
440 ACTION_P(ReturnArgument, ret_value) {
return ret_value; }
446 EXPECT_CALL(mock, IntFromString(
_)).WillOnce(ReturnArgument(42));
452 ACTION_P2(ReturnEqualsEitherOf, first, second) {
453 return arg0 == first || arg0 == second;
458 # pragma warning(pop)
466 .WillOnce(ReturnEqualsEitherOf(
"one",
"two"));
481 ON_CALL(mock, VoidFromString(A<char*>())).WillByDefault(
Return());
490 ON_CALL(mock, VoidFromString(const_cast<char*>(
"y")))
532 ON_CALL(mock, VoidFromIntRef(TypedEq<int&>(a))).WillByDefault(
Return());
590 char arr[] = {
'a',
'b' };
669 #endif // GMOCK_TEST_GMOCK_LINK_TEST_H_