115 #ifndef GMOCK_TEST_GMOCK_LINK_TEST_H_ 116 #define GMOCK_TEST_GMOCK_LINK_TEST_H_ 120 #if !GTEST_OS_WINDOWS_MOBILE 133 using testing::AllOf;
134 using testing::AnyOf;
136 using testing::ContainerEq;
139 using testing::DoubleEq;
140 using testing::ElementsAre;
141 using testing::ElementsAreArray;
142 using testing::EndsWith;
144 using testing::Field;
145 using testing::FloatEq;
148 using testing::HasSubstr;
151 using testing::InvokeArgument;
154 using testing::IsSubsetOf;
155 using testing::IsSupersetOf;
159 using testing::MatcherCast;
160 using testing::NanSensitiveDoubleEq;
161 using testing::NanSensitiveFloatEq;
164 using testing::NotNull;
165 using testing::Pointee;
166 using testing::Property;
168 using testing::ResultOf;
173 using testing::SetArrayArgument;
175 using testing::StrCaseEq;
176 using testing::StrCaseNe;
177 using testing::StrEq;
178 using testing::StrNe;
179 using testing::Truly;
180 using testing::TypedEq;
185 #if !GTEST_OS_WINDOWS_MOBILE 189 #if GTEST_HAS_EXCEPTIONS 190 using testing::Throw;
193 using testing::ContainsRegex;
194 using testing::MatchesRegex;
241 int field()
const {
return field_; }
309 #if !GTEST_OS_WINDOWS_MOBILE 315 int saved_errno = errno;
321 #endif // !GTEST_OS_WINDOWS_MOBILE 411 #if GTEST_HAS_EXCEPTIONS 419 #endif // GTEST_HAS_EXCEPTIONS 427 # pragma warning(push) 428 # pragma warning(disable:4100) 433 ACTION(Return1) {
return 1; }
445 ACTION_P(ReturnArgument, ret_value) {
return ret_value; }
457 ACTION_P2(ReturnEqualsEitherOf, first, second) {
458 return arg0 == first || arg0 == second;
463 # pragma warning(pop) 471 .WillOnce(ReturnEqualsEitherOf(
"one",
"two"));
595 char arr[] = {
'a',
'b' };
603 char arr[] = {
'a',
'b'};
611 char arr[] = {
'a',
'b'};
690 #endif // GMOCK_TEST_GMOCK_LINK_TEST_H_ const char * p
Definition: gmock-matchers_test.cc:3613
int field_
Definition: gmock_link_test.h:242
void VoidFromString(char *)
Definition: gmock_link_test.h:233
PolymorphicAction< internal::ReturnNullAction > ReturnNull()
Definition: gmock-actions.h:1009
virtual void VoidFromVector(const std::vector< int > &v)=0
Definition: gmock-nice-strict_test.cc:40
#define EXPECT_THROW(statement, expected_exception)
Definition: gtest.h:1932
FieldHelper(int a_field)
Definition: gmock_link_test.h:240
virtual int IntFromString(char *str)=0
virtual void VoidFromFloat(float n)=0
static void StaticVoidFromVoid()
Definition: gmock_link_test.h:230
PolymorphicAction< internal::AssignAction< T1, T2 > > Assign(T1 *ptr, T2 val)
Definition: gmock-actions.h:1061
static bool StaticBoolFromString(const char *)
Definition: gmock_link_test.h:235
int field() const
Definition: gmock_link_test.h:241
virtual int & IntRefFromString(char *str)=0
internal::DoAllAction< typename std::decay< Action >::type... > DoAll(Action &&...action)
Definition: gmock-actions.h:964
#define ON_CALL(obj, call)
#define ACTION(name)
Definition: gmock-generated-actions.h:718
Definition: gmock_link_test.h:238
internal::InvokeWithoutArgsAction< typename std::decay< FunctionImpl >::type > InvokeWithoutArgs(FunctionImpl function_impl)
Definition: gmock-actions.h:1099
static void StaticVoidFromString(char *)
Definition: gmock_link_test.h:232
internal::WithArgsAction< typename std::decay< InnerAction >::type, k, ks... > WithArgs(InnerAction &&action)
Definition: gmock-actions.h:986
Definition: gmock-internal-utils.h:52
PolymorphicAction< internal::SetErrnoAndReturnAction< T > > SetErrnoAndReturn(int errval, T result)
Definition: gmock-actions.h:1070
Mock()
Definition: gmock_link_test.h:212
internal::ReturnRefAction< R > ReturnRef(R &x)
Definition: gmock-actions.h:1020
std::decay< FunctionImpl >::type Invoke(FunctionImpl &&function_impl)
Definition: gmock-actions.h:1084
char ch
Definition: gmock-matchers_test.cc:3621
Definition: gmock-actions.h:338
virtual void VoidFromDouble(double n)=0
internal::SetArgumentPointeeAction< N, T > SetArgPointee(T x)
Definition: gmock-actions.h:1049
constexpr size_t n
Definition: MatrixInversionTest.cpp:14
internal::WithArgsAction< typename std::decay< InnerAction >::type > WithoutArgs(InnerAction &&action)
Definition: gmock-actions.h:996
Definition: gmock_link_test.h:228
virtual ~Interface()
Definition: gmock_link_test.h:198
Definition: gmock_link_test.h:196
virtual void VoidFromString(char *str)=0
static int StaticIntFromString(char *)
Definition: gmock_link_test.h:234
internal::DoDefaultAction DoDefault()
Definition: gmock-actions.h:1042
internal::ReturnAction< R > Return(R value)
Definition: gmock-actions.h:1004
#define EXPECT_CALL(obj, call)
virtual char * StringFromString(char *str)=0
#define GTEST_DISALLOW_COPY_AND_ASSIGN_(type)
Definition: gtest-port.h:688
internal::WithArgsAction< typename std::decay< InnerAction >::type, k > WithArg(InnerAction &&action)
Definition: gmock-actions.h:976
#define EXPECT_TRUE(condition)
Definition: gtest.h:1948
virtual void VoidFromIntRef(int &n)=0
#define MOCK_METHOD1(m,...)
Definition: gmock-generated-function-mockers.h:600
def StartsWith(lines, pos, string)
Definition: pump.py:163
#define ACTION_P(name, p0)
Definition: gmock-generated-actions.h:765
internal::IgnoreResultAction< A > IgnoreResult(const A &an_action)
Definition: gmock-actions.h:1115
virtual void VoidFromFunc(void(*func)(char *str))=0
#define EXPECT_FALSE(condition)
Definition: gtest.h:1951
AssertionResult IsNull(const char *str)
Definition: gtest-unittest-api_test.cc:139
TEST(LinkTest, TestReturnVoid)
Definition: gmock_link_test.h:247
#define ACTION_P2(name, p0, p1)
Definition: gmock-generated-actions.h:819
void VoidFromVoid()
Definition: gmock_link_test.h:231
#define LinkTest
Definition: gmock_link2_test.cc:37