proxygen
testing::gmock_generated_actions_test Namespace Reference

Namespaces

 action_test
 

Classes

class  BoolResetter
 
struct  GiantTemplate
 
class  NullaryConstructorClass
 
class  NullaryFunctor
 
class  SubstractAction
 
struct  SumOf5Functor
 
struct  SumOf6Functor
 
class  TenArgConstructorClass
 
class  UnaryConstructorClass
 
struct  UnaryFunctor
 

Functions

short Short (short n)
 
char Char (char ch)
 
int Nullary ()
 
bool Unary (int x)
 
const char * Plus1 (const char *s)
 
bool ByConstRef (const string &s)
 
bool ReferencesGlobalDouble (const double &x)
 
string ByNonConstRef (string &s)
 
const char * Binary (const char *input, short n)
 
void VoidBinary (int, char)
 
int Ternary (int x, char y, short z)
 
void VoidTernary (int, char, bool)
 
int SumOf4 (int a, int b, int c, int d)
 
string Concat4 (const char *s1, const char *s2, const char *s3, const char *s4)
 
int SumOf5 (int a, int b, int c, int d, int e)
 
string Concat5 (const char *s1, const char *s2, const char *s3, const char *s4, const char *s5)
 
int SumOf6 (int a, int b, int c, int d, int e, int f)
 
string Concat6 (const char *s1, const char *s2, const char *s3, const char *s4, const char *s5, const char *s6)
 
string Concat7 (const char *s1, const char *s2, const char *s3, const char *s4, const char *s5, const char *s6, const char *s7)
 
string Concat8 (const char *s1, const char *s2, const char *s3, const char *s4, const char *s5, const char *s6, const char *s7, const char *s8)
 
string Concat9 (const char *s1, const char *s2, const char *s3, const char *s4, const char *s5, const char *s6, const char *s7, const char *s8, const char *s9)
 
string Concat10 (const char *s1, const char *s2, const char *s3, const char *s4, const char *s5, const char *s6, const char *s7, const char *s8, const char *s9, const char *s10)
 
const char * CharPtr (const char *s)
 
 TEST (InvokeArgumentTest, Function0)
 
 TEST (InvokeArgumentTest, Functor1)
 
 TEST (InvokeArgumentTest, Function5)
 
 TEST (InvokeArgumentTest, Functor5)
 
 TEST (InvokeArgumentTest, Function6)
 
 TEST (InvokeArgumentTest, Functor6)
 
 TEST (InvokeArgumentTest, Function7)
 
 TEST (InvokeArgumentTest, Function8)
 
 TEST (InvokeArgumentTest, Function9)
 
 TEST (InvokeArgumentTest, Function10)
 
 TEST (InvokeArgumentTest, ByPointerFunction)
 
 TEST (InvokeArgumentTest, FunctionWithCStringLiteral)
 
 TEST (InvokeArgumentTest, ByConstReferenceFunction)
 
 TEST (InvokeArgumentTest, ByExplicitConstReferenceFunction)
 
 TEST (WithArgsTest, OneArg)
 
 TEST (WithArgsTest, TwoArgs)
 
 TEST (WithArgsTest, ThreeArgs)
 
 TEST (WithArgsTest, FourArgs)
 
 TEST (WithArgsTest, FiveArgs)
 
 TEST (WithArgsTest, SixArgs)
 
 TEST (WithArgsTest, SevenArgs)
 
 TEST (WithArgsTest, EightArgs)
 
 TEST (WithArgsTest, NineArgs)
 
 TEST (WithArgsTest, TenArgs)
 
 TEST (WithArgsTest, NonInvokeAction)
 
 TEST (WithArgsTest, Identity)
 
 TEST (WithArgsTest, RepeatedArguments)
 
 TEST (WithArgsTest, ReversedArgumentOrder)
 
 TEST (WithArgsTest, ArgsOfCompatibleTypes)
 
 TEST (WithArgsTest, VoidAction)
 
 TEST (DoAllTest, TwoActions)
 
 TEST (DoAllTest, ThreeActions)
 
 TEST (DoAllTest, FourActions)
 
 TEST (DoAllTest, FiveActions)
 
 TEST (DoAllTest, SixActions)
 
 TEST (DoAllTest, SevenActions)
 
 TEST (DoAllTest, EightActions)
 
 TEST (DoAllTest, NineActions)
 
 TEST (DoAllTest, TenActions)
 
 ACTION (Return5)
 
 TEST (ActionMacroTest, WorksWhenNotReferencingArguments)
 
 ACTION (IncrementArg1)
 
 TEST (ActionMacroTest, WorksWhenReturningVoid)
 
 ACTION (IncrementArg2)
 
 TEST (ActionMacroTest, CanReferenceArgumentType)
 
 ACTION (Sum2)
 
 TEST (ActionMacroTest, CanReferenceArgumentTuple)
 
int Dummy (bool flag)
 
 ACTION (InvokeDummy)
 
 TEST (ActionMacroTest, CanReferenceMockFunctionType)
 
 ACTION (InvokeDummy2)
 
 TEST (ActionMacroTest, CanReferenceMockFunctionReturnType)
 
 ACTION (ReturnAddrOfConstBoolReferenceArg)
 
 TEST (ActionMacroTest, WorksForConstReferenceArg)
 
 ACTION (ReturnAddrOfIntReferenceArg)
 
 TEST (ActionMacroTest, WorksForNonConstReferenceArg)
 
 TEST (ActionMacroTest, WorksInNamespace)
 
 ACTION (PlusTwo)
 
 TEST (ActionMacroTest, WorksForDifferentArgumentNumbers)
 
 ACTION_P (Plus, n)
 
 TEST (ActionPMacroTest, DefinesParameterizedAction)
 
 ACTION_P (TypedPlus, n)
 
 TEST (ActionPMacroTest, CanReferenceArgumentAndParameterTypes)
 
 TEST (ActionPMacroTest, WorksInCompatibleMockFunction)
 
 ACTION (OverloadedAction)
 
 ACTION_P (OverloadedAction, default_value)
 
 ACTION_P2 (OverloadedAction, true_value, false_value)
 
 TEST (ActionMacroTest, CanDefineOverloadedActions)
 
 ACTION_P3 (Plus, m, n, k)
 
 TEST (ActionPnMacroTest, WorksFor3Parameters)
 
 ACTION_P4 (Plus, p0, p1, p2, p3)
 
 TEST (ActionPnMacroTest, WorksFor4Parameters)
 
 ACTION_P5 (Plus, p0, p1, p2, p3, p4)
 
 TEST (ActionPnMacroTest, WorksFor5Parameters)
 
 ACTION_P6 (Plus, p0, p1, p2, p3, p4, p5)
 
 TEST (ActionPnMacroTest, WorksFor6Parameters)
 
 ACTION_P7 (Plus, p0, p1, p2, p3, p4, p5, p6)
 
 TEST (ActionPnMacroTest, WorksFor7Parameters)
 
 ACTION_P8 (Plus, p0, p1, p2, p3, p4, p5, p6, p7)
 
 TEST (ActionPnMacroTest, WorksFor8Parameters)
 
 ACTION_P9 (Plus, p0, p1, p2, p3, p4, p5, p6, p7, p8)
 
 TEST (ActionPnMacroTest, WorksFor9Parameters)
 
 ACTION_P10 (Plus, p0, p1, p2, p3, p4, p5, p6, p7, p8, last_param)
 
 TEST (ActionPnMacroTest, WorksFor10Parameters)
 
 ACTION_P2 (PadArgument, prefix, suffix)
 
 TEST (ActionPnMacroTest, SimpleTypePromotion)
 
 ACTION_P3 (ConcatImpl, a, b, c)
 
template<typename T1 , typename T2 >
ConcatImplActionP3< std::string, T1, T2Concat (const std::string &a, T1 b, T2 c)
 
template<typename T1 , typename T2 >
ConcatImplActionP3< T1, int, T2Concat (T1 a, int b, T2 c)
 
 TEST (ActionPnMacroTest, CanPartiallyRestrictParameterTypes)
 
 ACTION (DoFoo)
 
 ACTION_P (DoFoo, p)
 
 ACTION_P2 (DoFoo, p0, p1)
 
 TEST (ActionPnMacroTest, TypesAreCorrect)
 
 ACTION_P (Plus1, x)
 
 ACTION_P2 (Plus2, x, y)
 
 ACTION_P3 (Plus3, x, y, z)
 
 ACTION_P10 (Plus10, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)
 
 TEST (ActionPnMacroTest, CanExplicitlyInstantiateWithReferenceTypes)
 
 TEST (ReturnNewTest, NoArgs)
 
 TEST (ReturnNewTest, Unary)
 
 TEST (ReturnNewTest, UnaryWorksWhenMockMethodHasArgs)
 
 TEST (ReturnNewTest, UnaryWorksWhenMockMethodReturnsPointerToConst)
 
 TEST (ReturnNewTest, ConstructorThatTakes10Arguments)
 
 ACTION_TEMPLATE (CreateNew, HAS_1_TEMPLATE_PARAMS(typename, T), AND_0_VALUE_PARAMS())
 
 TEST (ActionTemplateTest, WorksWithoutValueParam)
 
 ACTION_TEMPLATE (CreateNew, HAS_1_TEMPLATE_PARAMS(typename, T), AND_1_VALUE_PARAMS(a0))
 
 TEST (ActionTemplateTest, WorksWithValueParams)
 
 ACTION_TEMPLATE (MyDeleteArg, HAS_1_TEMPLATE_PARAMS(int, k), AND_0_VALUE_PARAMS())
 
 TEST (ActionTemplateTest, WorksForIntegralTemplateParams)
 
 ACTION_TEMPLATE (ReturnSmartPointer, HAS_1_TEMPLATE_PARAMS(template< typename Pointee > class, Pointer), AND_1_VALUE_PARAMS(pointee))
 
 TEST (ActionTemplateTest, WorksForTemplateTemplateParameters)
 
 ACTION_TEMPLATE (ReturnGiant, HAS_10_TEMPLATE_PARAMS(typename, T1, typename, T2, typename, T3, int, k4, bool, k5, unsigned int, k6, class, T7, class, T8, class, T9, template< typename T > class, T10), AND_1_VALUE_PARAMS(value))
 
 TEST (ActionTemplateTest, WorksFor10TemplateParameters)
 
 ACTION_TEMPLATE (ReturnSum, HAS_1_TEMPLATE_PARAMS(typename, Number), AND_10_VALUE_PARAMS(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10))
 
 TEST (ActionTemplateTest, WorksFor10ValueParameters)
 
 ACTION (ReturnSum)
 
 ACTION_P (ReturnSum, x)
 
 ACTION_TEMPLATE (ReturnSum, HAS_1_TEMPLATE_PARAMS(typename, Number), AND_2_VALUE_PARAMS(v1, v2))
 
 ACTION_TEMPLATE (ReturnSum, HAS_1_TEMPLATE_PARAMS(typename, Number), AND_3_VALUE_PARAMS(v1, v2, v3))
 
 ACTION_TEMPLATE (ReturnSum, HAS_2_TEMPLATE_PARAMS(typename, Number, int, k), AND_4_VALUE_PARAMS(v1, v2, v3, v4))
 
 TEST (ActionTemplateTest, CanBeOverloadedOnNumberOfValueParameters)
 

Variables

bool g_done = false
 
const double g_double = 0
 

Function Documentation

testing::gmock_generated_actions_test::ACTION ( IncrementArg1  )

Definition at line 616 of file gmock-generated-actions_test.cc.

616 { (*arg1)++; }
testing::gmock_generated_actions_test::ACTION ( IncrementArg2  )

Definition at line 627 of file gmock-generated-actions_test.cc.

References shell_builder::temp.

627  {
628  StaticAssertTypeEq<int*, arg2_type>();
629  arg2_type temp = arg2;
630  (*temp)++;
631 }
testing::gmock_generated_actions_test::ACTION ( Sum2  )

Definition at line 642 of file gmock-generated-actions_test.cc.

642  {
643  StaticAssertTypeEq<tuple<int, char, int*>, args_type>();
644  args_type args_copy = args;
645  return get<0>(args_copy) + get<1>(args_copy);
646 }
testing::gmock_generated_actions_test::ACTION ( InvokeDummy  )

Definition at line 658 of file gmock-generated-actions_test.cc.

References Dummy().

658  {
659  StaticAssertTypeEq<int(bool), function_type>();
660  function_type* fp = &Dummy;
661  return (*fp)(true);
662 }
testing::gmock_generated_actions_test::ACTION ( InvokeDummy2  )

Definition at line 672 of file gmock-generated-actions_test.cc.

References Dummy().

672  {
673  StaticAssertTypeEq<int, return_type>();
674  return_type result = Dummy(true);
675  return result;
676 }
std::array< typename return_type_helper< D, TList... >::type, sizeof...(TList)> return_type
Definition: Array.h:52
testing::gmock_generated_actions_test::ACTION ( ReturnAddrOfConstBoolReferenceArg  )

Definition at line 685 of file gmock-generated-actions_test.cc.

685  {
686  StaticAssertTypeEq<const bool&, arg1_type>();
687  return &arg1;
688 }
testing::gmock_generated_actions_test::ACTION ( ReturnAddrOfIntReferenceArg  )

Definition at line 697 of file gmock-generated-actions_test.cc.

697  {
698  StaticAssertTypeEq<int&, arg0_type>();
699  return &arg0;
700 }
testing::gmock_generated_actions_test::ACTION ( PlusTwo  )

Definition at line 720 of file gmock-generated-actions_test.cc.

720 { return arg0 + 2; }
testing::gmock_generated_actions_test::ACTION ( OverloadedAction  )

Definition at line 763 of file gmock-generated-actions_test.cc.

763 { return arg0 ? arg1 : "hello"; }
testing::gmock_generated_actions_test::ACTION ( DoFoo  )

Definition at line 936 of file gmock-generated-actions_test.cc.

936 {}
testing::gmock_generated_actions_test::ACTION ( ReturnSum  )

Definition at line 1188 of file gmock-generated-actions_test.cc.

1188 { return 0; }
testing::gmock_generated_actions_test::ACTION_P ( Plus  ,
 
)
testing::gmock_generated_actions_test::ACTION_P ( TypedPlus  ,
 
)

Definition at line 741 of file gmock-generated-actions_test.cc.

741  {
742  arg0_type t1 = arg0;
743  n_type t2 = n;
744  return t1 + t2;
745 }
testing::gmock_generated_actions_test::ACTION_P ( OverloadedAction  ,
default_value   
)

Definition at line 765 of file gmock-generated-actions_test.cc.

765  {
766  return arg0 ? arg1 : default_value;
767 }
testing::gmock_generated_actions_test::ACTION_P ( DoFoo  ,
 
)

Definition at line 937 of file gmock-generated-actions_test.cc.

937 {}
testing::gmock_generated_actions_test::ACTION_P ( Plus1  ,
x   
)

Definition at line 980 of file gmock-generated-actions_test.cc.

References x.

980 { return x; }
const int x
testing::gmock_generated_actions_test::ACTION_P ( ReturnSum  ,
x   
)

Definition at line 1190 of file gmock-generated-actions_test.cc.

References x.

1190 { return x; }
const int x
testing::gmock_generated_actions_test::ACTION_P10 ( Plus  ,
p0  ,
p1  ,
p2  ,
p3  ,
p4  ,
p5  ,
p6  ,
p7  ,
p8  ,
last_param   
)

Definition at line 852 of file gmock-generated-actions_test.cc.

Referenced by testing::gmock_generated_actions_test::SubstractAction::Perform().

852  {
853  arg0_type t0 = arg0;
854  last_param_type t9 = last_param;
855  return t0 + p0 + p1 + p2 + p3 + p4 + p5 + p6 + p7 + p8 + t9;
856 }
testing::gmock_generated_actions_test::ACTION_P10 ( Plus10  ,
a0  ,
a1  ,
a2  ,
a3  ,
a4  ,
a5  ,
a6  ,
a7  ,
a8  ,
a9   
)

Definition at line 983 of file gmock-generated-actions_test.cc.

983  {
984  return a0 + a1 + a2 + a3 + a4 + a5 + a6 + a7 + a8 + a9;
985 }
testing::gmock_generated_actions_test::ACTION_P2 ( OverloadedAction  ,
true_value  ,
false_value   
)

Definition at line 769 of file gmock-generated-actions_test.cc.

Referenced by testing::gmock_generated_actions_test::SubstractAction::Perform().

769  {
770  return arg0 ? true_value : false_value;
771 }
testing::gmock_generated_actions_test::ACTION_P2 ( PadArgument  ,
prefix  ,
suffix   
)

Definition at line 866 of file gmock-generated-actions_test.cc.

References prefix(), string, and suffix.

866  {
867  // The following lines promote the two parameters to desired types.
868  std::string prefix_str(prefix);
869  char suffix_char = static_cast<char>(suffix);
870  return prefix_str + arg0 + suffix_char;
871 }
bool prefix(Cursor &c, uint32_t expected)
const char * suffix
Definition: String.cpp:272
const char * string
Definition: Conv.cpp:212
testing::gmock_generated_actions_test::ACTION_P2 ( DoFoo  ,
p0  ,
p1   
)

Definition at line 938 of file gmock-generated-actions_test.cc.

938 {}
testing::gmock_generated_actions_test::ACTION_P2 ( Plus2  ,
x  ,
 
)

Definition at line 981 of file gmock-generated-actions_test.cc.

981 { return x + y; }
Definition: InvokeTest.cpp:58
Definition: InvokeTest.cpp:65
testing::gmock_generated_actions_test::ACTION_P3 ( Plus  ,
m  ,
,
k   
)

Definition at line 791 of file gmock-generated-actions_test.cc.

References k, and m.

Referenced by testing::gmock_generated_actions_test::SubstractAction::Perform().

791 { return arg0 + m + n + k; }
static map< string, int > m
KeyT k
testing::gmock_generated_actions_test::ACTION_P3 ( ConcatImpl  ,
a  ,
b  ,
c   
)

Definition at line 887 of file gmock-generated-actions_test.cc.

References a, b, and c.

887  {
888  std::stringstream ss;
889  ss << a << b << c;
890  return ss.str();
891 }
char b
char a
char c
testing::gmock_generated_actions_test::ACTION_P3 ( Plus3  ,
x  ,
,
 
)

Definition at line 982 of file gmock-generated-actions_test.cc.

982 { return x + y + z; }
Definition: InvokeTest.cpp:58
Definition: InvokeTest.cpp:72
Definition: InvokeTest.cpp:65
testing::gmock_generated_actions_test::ACTION_P4 ( Plus  ,
p0  ,
p1  ,
p2  ,
p3   
)

Definition at line 802 of file gmock-generated-actions_test.cc.

Referenced by testing::gmock_generated_actions_test::SubstractAction::Perform().

802 { return arg0 + p0 + p1 + p2 + p3; }
testing::gmock_generated_actions_test::ACTION_P5 ( Plus  ,
p0  ,
p1  ,
p2  ,
p3  ,
p4   
)

Definition at line 809 of file gmock-generated-actions_test.cc.

Referenced by testing::gmock_generated_actions_test::SubstractAction::Perform().

809 { return arg0 + p0 + p1 + p2 + p3 + p4; }
testing::gmock_generated_actions_test::ACTION_P6 ( Plus  ,
p0  ,
p1  ,
p2  ,
p3  ,
p4  ,
p5   
)

Definition at line 816 of file gmock-generated-actions_test.cc.

Referenced by testing::gmock_generated_actions_test::SubstractAction::Perform().

816  {
817  return arg0 + p0 + p1 + p2 + p3 + p4 + p5;
818 }
testing::gmock_generated_actions_test::ACTION_P7 ( Plus  ,
p0  ,
p1  ,
p2  ,
p3  ,
p4  ,
p5  ,
p6   
)

Definition at line 825 of file gmock-generated-actions_test.cc.

Referenced by testing::gmock_generated_actions_test::SubstractAction::Perform().

825  {
826  return arg0 + p0 + p1 + p2 + p3 + p4 + p5 + p6;
827 }
testing::gmock_generated_actions_test::ACTION_P8 ( Plus  ,
p0  ,
p1  ,
p2  ,
p3  ,
p4  ,
p5  ,
p6  ,
p7   
)

Definition at line 834 of file gmock-generated-actions_test.cc.

Referenced by testing::gmock_generated_actions_test::SubstractAction::Perform().

834  {
835  return arg0 + p0 + p1 + p2 + p3 + p4 + p5 + p6 + p7;
836 }
testing::gmock_generated_actions_test::ACTION_P9 ( Plus  ,
p0  ,
p1  ,
p2  ,
p3  ,
p4  ,
p5  ,
p6  ,
p7  ,
p8   
)

Definition at line 843 of file gmock-generated-actions_test.cc.

Referenced by testing::gmock_generated_actions_test::SubstractAction::Perform().

843  {
844  return arg0 + p0 + p1 + p2 + p3 + p4 + p5 + p6 + p7 + p8;
845 }
testing::gmock_generated_actions_test::ACTION_TEMPLATE ( CreateNew  ,
HAS_1_TEMPLATE_PARAMS(typename, T ,
AND_0_VALUE_PARAMS()   
)
testing::gmock_generated_actions_test::ACTION_TEMPLATE ( CreateNew  ,
HAS_1_TEMPLATE_PARAMS(typename, T ,
AND_1_VALUE_PARAMS(a0)   
)

Definition at line 1085 of file gmock-generated-actions_test.cc.

References T.

1087  {
1088  return new T(a0);
1089 }
#define T(v)
Definition: http_parser.c:233
testing::gmock_generated_actions_test::ACTION_TEMPLATE ( MyDeleteArg  ,
HAS_1_TEMPLATE_PARAMS(int, k ,
AND_0_VALUE_PARAMS()   
)

Definition at line 1099 of file gmock-generated-actions_test.cc.

1101  {
1102  delete get<k>(args);
1103 }
testing::gmock_generated_actions_test::ACTION_TEMPLATE ( ReturnSmartPointer  ,
HAS_1_TEMPLATE_PARAMS(template< typename Pointee > class,Pointer)  ,
AND_1_VALUE_PARAMS(pointee)   
)

Definition at line 1124 of file gmock-generated-actions_test.cc.

1127  {
1128  return Pointer<pointee_type>(new pointee_type(pointee));
1129 }
testing::gmock_generated_actions_test::ACTION_TEMPLATE ( ReturnGiant  ,
HAS_10_TEMPLATE_PARAMS(typename, T1,typename, T2,typename, T3,int, k4,bool, k5,unsigned int, k6,class, T7,class, T8,class, T9,template< typename T > class, T10)  ,
AND_1_VALUE_PARAMS(value  
)

Definition at line 1147 of file gmock-generated-actions_test.cc.

References value.

1159  {
1160  return GiantTemplate<T10<T1>, T2, T3, k4, k5, k6, T7, T8, T9>(value);
1161 }
static const char *const value
Definition: Conv.cpp:50
testing::gmock_generated_actions_test::ACTION_TEMPLATE ( ReturnSum  ,
HAS_1_TEMPLATE_PARAMS(typename, Number)  ,
AND_10_VALUE_PARAMS(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10)   
)

Definition at line 1174 of file gmock-generated-actions_test.cc.

1176  {
1177  return static_cast<Number>(v1) + v2 + v3 + v4 + v5 + v6 + v7 + v8 + v9 + v10;
1178 }
testing::gmock_generated_actions_test::ACTION_TEMPLATE ( ReturnSum  ,
HAS_1_TEMPLATE_PARAMS(typename, Number)  ,
AND_2_VALUE_PARAMS(v1, v2)   
)

Definition at line 1192 of file gmock-generated-actions_test.cc.

1194  {
1195  return static_cast<Number>(v1) + v2;
1196 }
testing::gmock_generated_actions_test::ACTION_TEMPLATE ( ReturnSum  ,
HAS_1_TEMPLATE_PARAMS(typename, Number)  ,
AND_3_VALUE_PARAMS(v1, v2, v3)   
)

Definition at line 1198 of file gmock-generated-actions_test.cc.

1200  {
1201  return static_cast<Number>(v1) + v2 + v3;
1202 }
testing::gmock_generated_actions_test::ACTION_TEMPLATE ( ReturnSum  ,
HAS_2_TEMPLATE_PARAMS(typename, Number, int, k ,
AND_4_VALUE_PARAMS(v1, v2, v3, v4)   
)

Definition at line 1204 of file gmock-generated-actions_test.cc.

References k.

1206  {
1207  return static_cast<Number>(v1) + v2 + v3 + v4 + k;
1208 }
KeyT k
const char * testing::gmock_generated_actions_test::Binary ( const char *  input,
short  n 
)
bool testing::gmock_generated_actions_test::ByConstRef ( const string s)
string testing::gmock_generated_actions_test::ByNonConstRef ( string s)

Definition at line 89 of file gmock-generated-actions_test.cc.

Referenced by testing::gmock_generated_actions_test::NullaryFunctor::operator()().

89 { return s += "+"; } // NOLINT
static set< string > s
char testing::gmock_generated_actions_test::Char ( char  ch)
inline

Definition at line 68 of file gmock-generated-actions_test.cc.

References ch.

Referenced by folly::BasicFixedString< Char, N >::append(), folly::BasicFixedString< Char, N >::assign(), folly::BasicFixedString< Char, N >::BasicFixedString(), folly::fbstring_core< char >::c_str(), folly::BasicFixedString< Char, N >::cappend(), folly::BasicFixedString< Char, N >::cerase(), folly::detail::fixedstring::char_at_(), folly::detail::fixedstring::checkNullTerminated(), folly::BasicFixedString< Char, N >::clear(), folly::detail::fixedstring::Helper::concat_(), folly::detail::constexpr_strlen_internal(), folly::fbstring_core< Char >::copyMedium(), folly::fbstring_core< Char >::RefCounted::create(), folly::BasicFixedString< Char, N >::creplace(), folly::BasicFixedString< Char, N >::erase(), folly::fbstring_core< char >::fbstring_core(), folly::fbstring_core< Char >::initMedium(), folly::fbstring_core< Char >::initSmall(), folly::dummy_fbstring_core< Char >::mutableData(), testing::gmock_generated_actions_test::SumOf6Functor::operator()(), folly::BasicFixedString< Char, N >::operator=(), testing::gmock_generated_actions_test::SubstractAction::Perform(), folly::BasicFixedString< Char, N >::pop_back(), testing::internal::PrintAsStringLiteralTo(), folly::BasicFixedString< Char, N >::push_back(), folly::fbstring_core< Char >::RefCounted::reallocate(), folly::detail::fixedstring::Helper::replace_(), folly::fbstring_core< char >::reserve(), folly::fbstring_core< Char >::reserveMedium(), folly::fbstring_core< Char >::reserveSmall(), folly::BasicFixedString< Char, N >::resize(), folly::fbstring_core< char >::setSmallSize(), TEST(), and testing::TEST().

68 { return ch; }
auto ch
const char * testing::gmock_generated_actions_test::CharPtr ( const char *  s)
inline
template<typename T1 , typename T2 >
ConcatImplActionP3< std::string, T1, T2 > testing::gmock_generated_actions_test::Concat ( const std::string a,
T1  b,
T2  c 
)

Definition at line 903 of file gmock-generated-actions_test.cc.

References a, b, c, GTEST_INTENTIONAL_CONST_COND_POP_, and GTEST_INTENTIONAL_CONST_COND_PUSH_.

Referenced by testing::gmock_generated_actions_test::SubstractAction::Perform(), and TEST().

903  {
905  if (true) {
907  // This branch verifies that ConcatImpl() can be invoked without
908  // explicit template arguments.
909  return ConcatImpl(a, b, c);
910  } else {
911  // This branch verifies that ConcatImpl() can also be invoked with
912  // explicit template arguments. It doesn't really need to be
913  // executed as this is a compile-time verification.
914  return ConcatImpl<std::string, T1, T2>(a, b, c);
915  }
916 }
char b
#define GTEST_INTENTIONAL_CONST_COND_POP_()
Definition: gtest-port.h:899
char a
if(FOLLY_USE_SYMBOLIZER) add_library(folly_exception_tracer_base ExceptionTracer.cpp StackTrace.cpp) apply_folly_compile_options_to_target(folly_exception_tracer_base) target_link_libraries(folly_exception_tracer_base PUBLIC folly) add_library(folly_exception_tracer ExceptionStackTraceLib.cpp ExceptionTracerLib.cpp) apply_folly_compile_options_to_target(folly_exception_tracer) target_link_libraries(folly_exception_tracer PUBLIC folly_exception_tracer_base) add_library(folly_exception_counter ExceptionCounterLib.cpp) apply_folly_compile_options_to_target(folly_exception_counter) target_link_libraries(folly_exception_counter PUBLIC folly_exception_tracer) install(FILES ExceptionAbi.h ExceptionCounterLib.h ExceptionTracer.h ExceptionTracerLib.h StackTrace.h DESTINATION $
Definition: CMakeLists.txt:1
char c
#define GTEST_INTENTIONAL_CONST_COND_PUSH_()
Definition: gtest-port.h:897
template<typename T1 , typename T2 >
ConcatImplActionP3< T1, int, T2 > testing::gmock_generated_actions_test::Concat ( T1  a,
int  b,
T2  c 
)

Definition at line 922 of file gmock-generated-actions_test.cc.

922  {
923  return ConcatImpl(a, b, c);
924 }
char b
string testing::gmock_generated_actions_test::Concat10 ( const char *  s1,
const char *  s2,
const char *  s3,
const char *  s4,
const char *  s5,
const char *  s6,
const char *  s7,
const char *  s8,
const char *  s9,
const char *  s10 
)

Definition at line 156 of file gmock-generated-actions_test.cc.

References string.

Referenced by testing::gmock_generated_actions_test::SumOf6Functor::operator()(), and TEST().

159  {
160  return string(s1) + s2 + s3 + s4 + s5 + s6 + s7 + s8 + s9 + s10;
161 }
const char * string
Definition: Conv.cpp:212
string testing::gmock_generated_actions_test::Concat4 ( const char *  s1,
const char *  s2,
const char *  s3,
const char *  s4 
)

Definition at line 105 of file gmock-generated-actions_test.cc.

References string.

Referenced by testing::gmock_generated_actions_test::UnaryFunctor::operator()(), testing::gmock_generated_actions_test::SumOf6Functor::operator()(), and TEST().

106  {
107  return string(s1) + s2 + s3 + s4;
108 }
const char * string
Definition: Conv.cpp:212
string testing::gmock_generated_actions_test::Concat5 ( const char *  s1,
const char *  s2,
const char *  s3,
const char *  s4,
const char *  s5 
)

Definition at line 118 of file gmock-generated-actions_test.cc.

References string.

Referenced by testing::gmock_generated_actions_test::SumOf5Functor::operator()(), testing::gmock_generated_actions_test::SumOf6Functor::operator()(), and TEST().

119  {
120  return string(s1) + s2 + s3 + s4 + s5;
121 }
const char * string
Definition: Conv.cpp:212
string testing::gmock_generated_actions_test::Concat6 ( const char *  s1,
const char *  s2,
const char *  s3,
const char *  s4,
const char *  s5,
const char *  s6 
)

Definition at line 133 of file gmock-generated-actions_test.cc.

References string.

Referenced by testing::gmock_generated_actions_test::SumOf6Functor::operator()(), and TEST().

134  {
135  return string(s1) + s2 + s3 + s4 + s5 + s6;
136 }
const char * string
Definition: Conv.cpp:212
string testing::gmock_generated_actions_test::Concat7 ( const char *  s1,
const char *  s2,
const char *  s3,
const char *  s4,
const char *  s5,
const char *  s6,
const char *  s7 
)

Definition at line 138 of file gmock-generated-actions_test.cc.

References string.

Referenced by testing::gmock_generated_actions_test::SumOf6Functor::operator()(), and TEST().

140  {
141  return string(s1) + s2 + s3 + s4 + s5 + s6 + s7;
142 }
const char * string
Definition: Conv.cpp:212
string testing::gmock_generated_actions_test::Concat8 ( const char *  s1,
const char *  s2,
const char *  s3,
const char *  s4,
const char *  s5,
const char *  s6,
const char *  s7,
const char *  s8 
)

Definition at line 144 of file gmock-generated-actions_test.cc.

References string.

Referenced by testing::gmock_generated_actions_test::SumOf6Functor::operator()(), and TEST().

146  {
147  return string(s1) + s2 + s3 + s4 + s5 + s6 + s7 + s8;
148 }
const char * string
Definition: Conv.cpp:212
string testing::gmock_generated_actions_test::Concat9 ( const char *  s1,
const char *  s2,
const char *  s3,
const char *  s4,
const char *  s5,
const char *  s6,
const char *  s7,
const char *  s8,
const char *  s9 
)

Definition at line 150 of file gmock-generated-actions_test.cc.

References string.

Referenced by testing::gmock_generated_actions_test::SumOf6Functor::operator()(), and TEST().

152  {
153  return string(s1) + s2 + s3 + s4 + s5 + s6 + s7 + s8 + s9;
154 }
const char * string
Definition: Conv.cpp:212
int testing::gmock_generated_actions_test::Dummy ( bool  flag)
int testing::gmock_generated_actions_test::Nullary ( )

Definition at line 71 of file gmock-generated-actions_test.cc.

Referenced by testing::gmock_generated_actions_test::SumOf6Functor::operator()(), and TEST().

71 { return 1; }
const char * testing::gmock_generated_actions_test::Plus1 ( const char *  s)
bool testing::gmock_generated_actions_test::ReferencesGlobalDouble ( const double &  x)
short testing::gmock_generated_actions_test::Short ( short  n)
inline
int testing::gmock_generated_actions_test::SumOf4 ( int  a,
int  b,
int  c,
int  d 
)
int testing::gmock_generated_actions_test::SumOf5 ( int  a,
int  b,
int  c,
int  d,
int  e 
)
int testing::gmock_generated_actions_test::SumOf6 ( int  a,
int  b,
int  c,
int  d,
int  e,
int  f 
)

Definition at line 123 of file gmock-generated-actions_test.cc.

References f.

Referenced by testing::gmock_generated_actions_test::SumOf5Functor::operator()(), testing::gmock_generated_actions_test::SumOf6Functor::operator()(), and TEST().

123  {
124  return a + b + c + d + e + f;
125 }
auto f
char b
char a
char c
int testing::gmock_generated_actions_test::Ternary ( int  x,
char  y,
short  z 
)
testing::gmock_generated_actions_test::TEST ( InvokeArgumentTest  ,
Functor1   
)

Definition at line 176 of file gmock-generated-actions_test.cc.

References a, EXPECT_EQ, std::tr1::make_tuple(), and testing::Action< F >::Perform().

176  {
177  Action<int(UnaryFunctor)> a = InvokeArgument<0>(true); // NOLINT
178  EXPECT_EQ(1, a.Perform(make_tuple(UnaryFunctor())));
179 }
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
tuple make_tuple()
Definition: gtest-tuple.h:675
char a
testing::gmock_generated_actions_test::TEST ( InvokeArgumentTest  ,
Function5   
)

Definition at line 182 of file gmock-generated-actions_test.cc.

References a, EXPECT_EQ, std::tr1::make_tuple(), testing::Action< F >::Perform(), and SumOf5().

182  {
183  Action<int(int(*)(int, int, int, int, int))> a = // NOLINT
184  InvokeArgument<0>(10000, 2000, 300, 40, 5);
185  EXPECT_EQ(12345, a.Perform(make_tuple(&SumOf5)));
186 }
int SumOf5(int a, int b, int c, int d, int e)
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
tuple make_tuple()
Definition: gtest-tuple.h:675
char a
testing::gmock_generated_actions_test::TEST ( InvokeArgumentTest  ,
Functor5   
)

Definition at line 189 of file gmock-generated-actions_test.cc.

References a, EXPECT_EQ, std::tr1::make_tuple(), and testing::Action< F >::Perform().

189  {
190  Action<int(SumOf5Functor)> a = // NOLINT
191  InvokeArgument<0>(10000, 2000, 300, 40, 5);
192  EXPECT_EQ(12345, a.Perform(make_tuple(SumOf5Functor())));
193 }
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
tuple make_tuple()
Definition: gtest-tuple.h:675
char a
testing::gmock_generated_actions_test::TEST ( InvokeArgumentTest  ,
Function6   
)

Definition at line 196 of file gmock-generated-actions_test.cc.

References a, EXPECT_EQ, std::tr1::make_tuple(), testing::Action< F >::Perform(), and SumOf6().

196  {
197  Action<int(int(*)(int, int, int, int, int, int))> a = // NOLINT
198  InvokeArgument<0>(100000, 20000, 3000, 400, 50, 6);
199  EXPECT_EQ(123456, a.Perform(make_tuple(&SumOf6)));
200 }
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
tuple make_tuple()
Definition: gtest-tuple.h:675
int SumOf6(int a, int b, int c, int d, int e, int f)
char a
testing::gmock_generated_actions_test::TEST ( InvokeArgumentTest  ,
Functor6   
)

Definition at line 203 of file gmock-generated-actions_test.cc.

References a, EXPECT_EQ, std::tr1::make_tuple(), and testing::Action< F >::Perform().

203  {
204  Action<int(SumOf6Functor)> a = // NOLINT
205  InvokeArgument<0>(100000, 20000, 3000, 400, 50, 6);
206  EXPECT_EQ(123456, a.Perform(make_tuple(SumOf6Functor())));
207 }
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
tuple make_tuple()
Definition: gtest-tuple.h:675
char a
testing::gmock_generated_actions_test::TEST ( InvokeArgumentTest  ,
Function7   
)

Definition at line 210 of file gmock-generated-actions_test.cc.

References a, Concat7(), EXPECT_EQ, std::tr1::make_tuple(), testing::Action< F >::Perform(), and string.

210  {
211  Action<string(string(*)(const char*, const char*, const char*,
212  const char*, const char*, const char*,
213  const char*))> a =
214  InvokeArgument<0>("1", "2", "3", "4", "5", "6", "7");
215  EXPECT_EQ("1234567", a.Perform(make_tuple(&Concat7)));
216 }
string Concat7(const char *s1, const char *s2, const char *s3, const char *s4, const char *s5, const char *s6, const char *s7)
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
tuple make_tuple()
Definition: gtest-tuple.h:675
boost::variant< DeliverAppData, WriteToSocket, ReportHandshakeSuccess, ReportEarlyHandshakeSuccess, ReportEarlyWriteFailed, ReportError, MutateState, WaitForData, NewCachedPsk > Action
Definition: Actions.h:79
char a
const char * string
Definition: Conv.cpp:212
testing::gmock_generated_actions_test::TEST ( InvokeArgumentTest  ,
Function8   
)

Definition at line 219 of file gmock-generated-actions_test.cc.

References a, Concat8(), EXPECT_EQ, std::tr1::make_tuple(), testing::Action< F >::Perform(), and string.

219  {
220  Action<string(string(*)(const char*, const char*, const char*,
221  const char*, const char*, const char*,
222  const char*, const char*))> a =
223  InvokeArgument<0>("1", "2", "3", "4", "5", "6", "7", "8");
224  EXPECT_EQ("12345678", a.Perform(make_tuple(&Concat8)));
225 }
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
tuple make_tuple()
Definition: gtest-tuple.h:675
boost::variant< DeliverAppData, WriteToSocket, ReportHandshakeSuccess, ReportEarlyHandshakeSuccess, ReportEarlyWriteFailed, ReportError, MutateState, WaitForData, NewCachedPsk > Action
Definition: Actions.h:79
char a
string Concat8(const char *s1, const char *s2, const char *s3, const char *s4, const char *s5, const char *s6, const char *s7, const char *s8)
const char * string
Definition: Conv.cpp:212
testing::gmock_generated_actions_test::TEST ( InvokeArgumentTest  ,
Function9   
)

Definition at line 228 of file gmock-generated-actions_test.cc.

References a, Concat9(), EXPECT_EQ, std::tr1::make_tuple(), testing::Action< F >::Perform(), and string.

228  {
229  Action<string(string(*)(const char*, const char*, const char*,
230  const char*, const char*, const char*,
231  const char*, const char*, const char*))> a =
232  InvokeArgument<0>("1", "2", "3", "4", "5", "6", "7", "8", "9");
233  EXPECT_EQ("123456789", a.Perform(make_tuple(&Concat9)));
234 }
string Concat9(const char *s1, const char *s2, const char *s3, const char *s4, const char *s5, const char *s6, const char *s7, const char *s8, const char *s9)
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
tuple make_tuple()
Definition: gtest-tuple.h:675
boost::variant< DeliverAppData, WriteToSocket, ReportHandshakeSuccess, ReportEarlyHandshakeSuccess, ReportEarlyWriteFailed, ReportError, MutateState, WaitForData, NewCachedPsk > Action
Definition: Actions.h:79
char a
const char * string
Definition: Conv.cpp:212
testing::gmock_generated_actions_test::TEST ( InvokeArgumentTest  ,
Function10   
)

Definition at line 237 of file gmock-generated-actions_test.cc.

References a, Concat10(), EXPECT_EQ, std::tr1::make_tuple(), testing::Action< F >::Perform(), and string.

237  {
238  Action<string(string(*)(const char*, const char*, const char*,
239  const char*, const char*, const char*,
240  const char*, const char*, const char*,
241  const char*))> a =
242  InvokeArgument<0>("1", "2", "3", "4", "5", "6", "7", "8", "9", "0");
243  EXPECT_EQ("1234567890", a.Perform(make_tuple(&Concat10)));
244 }
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
tuple make_tuple()
Definition: gtest-tuple.h:675
boost::variant< DeliverAppData, WriteToSocket, ReportHandshakeSuccess, ReportEarlyHandshakeSuccess, ReportEarlyWriteFailed, ReportError, MutateState, WaitForData, NewCachedPsk > Action
Definition: Actions.h:79
string Concat10(const char *s1, const char *s2, const char *s3, const char *s4, const char *s5, const char *s6, const char *s7, const char *s8, const char *s9, const char *s10)
char a
const char * string
Definition: Conv.cpp:212
testing::gmock_generated_actions_test::TEST ( InvokeArgumentTest  ,
ByPointerFunction   
)

Definition at line 247 of file gmock-generated-actions_test.cc.

References a, Binary(), EXPECT_STREQ, std::tr1::make_tuple(), testing::Action< F >::Perform(), and Short().

247  {
248  Action<const char*(const char*(*)(const char* input, short n))> a = // NOLINT
249  InvokeArgument<0>(static_cast<const char*>("Hi"), Short(1));
250  EXPECT_STREQ("i", a.Perform(make_tuple(&Binary)));
251 }
const char * Binary(const char *input, short n)
tuple make_tuple()
Definition: gtest-tuple.h:675
#define EXPECT_STREQ(s1, s2)
Definition: gtest.h:1995
char a
testing::gmock_generated_actions_test::TEST ( InvokeArgumentTest  ,
FunctionWithCStringLiteral   
)

Definition at line 255 of file gmock-generated-actions_test.cc.

References a, Binary(), EXPECT_STREQ, std::tr1::make_tuple(), testing::Action< F >::Perform(), and Short().

255  {
256  Action<const char*(const char*(*)(const char* input, short n))> a = // NOLINT
257  InvokeArgument<0>("Hi", Short(1));
258  EXPECT_STREQ("i", a.Perform(make_tuple(&Binary)));
259 }
const char * Binary(const char *input, short n)
tuple make_tuple()
Definition: gtest-tuple.h:675
#define EXPECT_STREQ(s1, s2)
Definition: gtest.h:1995
char a
testing::gmock_generated_actions_test::TEST ( InvokeArgumentTest  ,
ByConstReferenceFunction   
)

Definition at line 262 of file gmock-generated-actions_test.cc.

References a, ByConstRef(), EXPECT_TRUE, std::tr1::make_tuple(), testing::Action< F >::Perform(), and string.

262  {
263  Action<bool(bool(*function)(const string& s))> a = // NOLINT
264  InvokeArgument<0>(string("Hi"));
265  // When action 'a' is constructed, it makes a copy of the temporary
266  // string object passed to it, so it's OK to use 'a' later, when the
267  // temporary object has already died.
268  EXPECT_TRUE(a.Perform(make_tuple(&ByConstRef)));
269 }
tuple make_tuple()
Definition: gtest-tuple.h:675
char a
#define EXPECT_TRUE(condition)
Definition: gtest.h:1859
const char * string
Definition: Conv.cpp:212
testing::gmock_generated_actions_test::TEST ( InvokeArgumentTest  ,
ByExplicitConstReferenceFunction   
)

Definition at line 273 of file gmock-generated-actions_test.cc.

References a, testing::ByRef(), EXPECT_FALSE, EXPECT_TRUE, std::tr1::make_tuple(), testing::Action< F >::Perform(), and ReferencesGlobalDouble().

273  {
274  Action<bool(bool(*)(const double& x))> a = // NOLINT
275  InvokeArgument<0>(ByRef(g_double));
276  // The above line calls ByRef() on a const value.
278 
279  double x = 0;
280  a = InvokeArgument<0>(ByRef(x)); // This calls ByRef() on a non-const.
282 }
Definition: InvokeTest.cpp:58
tuple make_tuple()
Definition: gtest-tuple.h:675
char a
#define EXPECT_TRUE(condition)
Definition: gtest.h:1859
internal::ReferenceWrapper< T > ByRef(T &l_value)
#define EXPECT_FALSE(condition)
Definition: gtest.h:1862
testing::gmock_generated_actions_test::TEST ( WithArgsTest  ,
OneArg   
)

Definition at line 285 of file gmock-generated-actions_test.cc.

References a, EXPECT_FALSE, EXPECT_TRUE, testing::Invoke(), std::tr1::make_tuple(), testing::Action< F >::Perform(), and Unary().

285  {
286  Action<bool(double x, int n)> a = WithArgs<1>(Invoke(Unary)); // NOLINT
287  EXPECT_TRUE(a.Perform(make_tuple(1.5, -1)));
288  EXPECT_FALSE(a.Perform(make_tuple(1.5, 1)));
289 }
tuple make_tuple()
Definition: gtest-tuple.h:675
PolymorphicAction< internal::InvokeAction< FunctionImpl > > Invoke(FunctionImpl function_impl)
char a
#define EXPECT_TRUE(condition)
Definition: gtest.h:1859
#define EXPECT_FALSE(condition)
Definition: gtest.h:1862
testing::gmock_generated_actions_test::TEST ( WithArgsTest  ,
TwoArgs   
)

Definition at line 292 of file gmock-generated-actions_test.cc.

References a, Binary(), CharPtr(), EXPECT_EQ, testing::Invoke(), std::tr1::make_tuple(), testing::Action< F >::Perform(), s, and Short().

292  {
293  Action<const char*(const char* s, double x, short n)> a =
294  WithArgs<0, 2>(Invoke(Binary));
295  const char s[] = "Hello";
296  EXPECT_EQ(s + 2, a.Perform(make_tuple(CharPtr(s), 0.5, Short(2))));
297 }
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
const char * Binary(const char *input, short n)
tuple make_tuple()
Definition: gtest-tuple.h:675
PolymorphicAction< internal::InvokeAction< FunctionImpl > > Invoke(FunctionImpl function_impl)
char a
static set< string > s
testing::gmock_generated_actions_test::TEST ( WithArgsTest  ,
ThreeArgs   
)

Definition at line 300 of file gmock-generated-actions_test.cc.

References a, Char(), EXPECT_EQ, testing::Invoke(), std::tr1::make_tuple(), testing::Action< F >::Perform(), Short(), and Ternary().

300  {
301  Action<int(int, double, char, short)> a = // NOLINT
302  WithArgs<0, 2, 3>(Invoke(Ternary));
303  EXPECT_EQ(123, a.Perform(make_tuple(100, 6.5, Char(20), Short(3))));
304 }
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
tuple make_tuple()
Definition: gtest-tuple.h:675
PolymorphicAction< internal::InvokeAction< FunctionImpl > > Invoke(FunctionImpl function_impl)
char a
testing::gmock_generated_actions_test::TEST ( WithArgsTest  ,
FourArgs   
)

Definition at line 307 of file gmock-generated-actions_test.cc.

References a, CharPtr(), Concat4(), EXPECT_EQ, testing::Invoke(), std::tr1::make_tuple(), and testing::Action< F >::Perform().

307  {
308  Action<string(const char*, const char*, double, const char*, const char*)> a =
309  WithArgs<4, 3, 1, 0>(Invoke(Concat4));
310  EXPECT_EQ("4310", a.Perform(make_tuple(CharPtr("0"), CharPtr("1"), 2.5,
311  CharPtr("3"), CharPtr("4"))));
312 }
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
tuple make_tuple()
Definition: gtest-tuple.h:675
string Concat4(const char *s1, const char *s2, const char *s3, const char *s4)
PolymorphicAction< internal::InvokeAction< FunctionImpl > > Invoke(FunctionImpl function_impl)
char a
testing::gmock_generated_actions_test::TEST ( WithArgsTest  ,
FiveArgs   
)

Definition at line 315 of file gmock-generated-actions_test.cc.

References a, CharPtr(), Concat5(), EXPECT_EQ, testing::Invoke(), std::tr1::make_tuple(), testing::Action< F >::Perform(), and string.

315  {
316  Action<string(const char*, const char*, const char*,
317  const char*, const char*)> a =
318  WithArgs<4, 3, 2, 1, 0>(Invoke(Concat5));
319  EXPECT_EQ("43210",
320  a.Perform(make_tuple(CharPtr("0"), CharPtr("1"), CharPtr("2"),
321  CharPtr("3"), CharPtr("4"))));
322 }
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
tuple make_tuple()
Definition: gtest-tuple.h:675
boost::variant< DeliverAppData, WriteToSocket, ReportHandshakeSuccess, ReportEarlyHandshakeSuccess, ReportEarlyWriteFailed, ReportError, MutateState, WaitForData, NewCachedPsk > Action
Definition: Actions.h:79
PolymorphicAction< internal::InvokeAction< FunctionImpl > > Invoke(FunctionImpl function_impl)
char a
string Concat5(const char *s1, const char *s2, const char *s3, const char *s4, const char *s5)
const char * string
Definition: Conv.cpp:212
testing::gmock_generated_actions_test::TEST ( WithArgsTest  ,
SixArgs   
)

Definition at line 325 of file gmock-generated-actions_test.cc.

References a, CharPtr(), Concat6(), EXPECT_EQ, testing::Invoke(), std::tr1::make_tuple(), and testing::Action< F >::Perform().

325  {
326  Action<string(const char*, const char*, const char*)> a =
327  WithArgs<0, 1, 2, 2, 1, 0>(Invoke(Concat6));
328  EXPECT_EQ("012210",
329  a.Perform(make_tuple(CharPtr("0"), CharPtr("1"), CharPtr("2"))));
330 }
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
tuple make_tuple()
Definition: gtest-tuple.h:675
PolymorphicAction< internal::InvokeAction< FunctionImpl > > Invoke(FunctionImpl function_impl)
char a
string Concat6(const char *s1, const char *s2, const char *s3, const char *s4, const char *s5, const char *s6)
testing::gmock_generated_actions_test::TEST ( WithArgsTest  ,
SevenArgs   
)

Definition at line 333 of file gmock-generated-actions_test.cc.

References a, CharPtr(), Concat7(), EXPECT_EQ, testing::Invoke(), std::tr1::make_tuple(), and testing::Action< F >::Perform().

333  {
334  Action<string(const char*, const char*, const char*, const char*)> a =
335  WithArgs<0, 1, 2, 3, 2, 1, 0>(Invoke(Concat7));
336  EXPECT_EQ("0123210",
337  a.Perform(make_tuple(CharPtr("0"), CharPtr("1"), CharPtr("2"),
338  CharPtr("3"))));
339 }
string Concat7(const char *s1, const char *s2, const char *s3, const char *s4, const char *s5, const char *s6, const char *s7)
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
tuple make_tuple()
Definition: gtest-tuple.h:675
PolymorphicAction< internal::InvokeAction< FunctionImpl > > Invoke(FunctionImpl function_impl)
char a
testing::gmock_generated_actions_test::TEST ( WithArgsTest  ,
EightArgs   
)

Definition at line 342 of file gmock-generated-actions_test.cc.

References a, CharPtr(), Concat8(), EXPECT_EQ, testing::Invoke(), std::tr1::make_tuple(), and testing::Action< F >::Perform().

342  {
343  Action<string(const char*, const char*, const char*, const char*)> a =
344  WithArgs<0, 1, 2, 3, 0, 1, 2, 3>(Invoke(Concat8));
345  EXPECT_EQ("01230123",
346  a.Perform(make_tuple(CharPtr("0"), CharPtr("1"), CharPtr("2"),
347  CharPtr("3"))));
348 }
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
tuple make_tuple()
Definition: gtest-tuple.h:675
PolymorphicAction< internal::InvokeAction< FunctionImpl > > Invoke(FunctionImpl function_impl)
char a
string Concat8(const char *s1, const char *s2, const char *s3, const char *s4, const char *s5, const char *s6, const char *s7, const char *s8)
testing::gmock_generated_actions_test::TEST ( WithArgsTest  ,
NineArgs   
)

Definition at line 351 of file gmock-generated-actions_test.cc.

References a, CharPtr(), Concat9(), EXPECT_EQ, testing::Invoke(), std::tr1::make_tuple(), and testing::Action< F >::Perform().

351  {
352  Action<string(const char*, const char*, const char*, const char*)> a =
353  WithArgs<0, 1, 2, 3, 1, 2, 3, 2, 3>(Invoke(Concat9));
354  EXPECT_EQ("012312323",
355  a.Perform(make_tuple(CharPtr("0"), CharPtr("1"), CharPtr("2"),
356  CharPtr("3"))));
357 }
string Concat9(const char *s1, const char *s2, const char *s3, const char *s4, const char *s5, const char *s6, const char *s7, const char *s8, const char *s9)
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
tuple make_tuple()
Definition: gtest-tuple.h:675
PolymorphicAction< internal::InvokeAction< FunctionImpl > > Invoke(FunctionImpl function_impl)
char a
testing::gmock_generated_actions_test::TEST ( WithArgsTest  ,
TenArgs   
)

Definition at line 360 of file gmock-generated-actions_test.cc.

References a, CharPtr(), Concat10(), EXPECT_EQ, testing::Invoke(), std::tr1::make_tuple(), and testing::Action< F >::Perform().

360  {
361  Action<string(const char*, const char*, const char*, const char*)> a =
362  WithArgs<0, 1, 2, 3, 2, 1, 0, 1, 2, 3>(Invoke(Concat10));
363  EXPECT_EQ("0123210123",
364  a.Perform(make_tuple(CharPtr("0"), CharPtr("1"), CharPtr("2"),
365  CharPtr("3"))));
366 }
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
tuple make_tuple()
Definition: gtest-tuple.h:675
PolymorphicAction< internal::InvokeAction< FunctionImpl > > Invoke(FunctionImpl function_impl)
string Concat10(const char *s1, const char *s2, const char *s3, const char *s4, const char *s5, const char *s6, const char *s7, const char *s8, const char *s9, const char *s10)
char a
testing::gmock_generated_actions_test::TEST ( WithArgsTest  ,
NonInvokeAction   
)

Definition at line 376 of file gmock-generated-actions_test.cc.

References a, EXPECT_EQ, testing::MakeAction(), testing::Action< F >::Perform(), and s.

376  {
377  Action<int(const string&, int, int)> a = // NOLINT
378  WithArgs<2, 1>(MakeAction(new SubstractAction));
379  string s("hello");
380  EXPECT_EQ(8, a.Perform(tuple<const string&, int, int>(s, 2, 10)));
381 }
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
Action< F > MakeAction(ActionInterface< F > *impl)
char a
static set< string > s
testing::gmock_generated_actions_test::TEST ( WithArgsTest  ,
Identity   
)

Definition at line 384 of file gmock-generated-actions_test.cc.

References a, Char(), EXPECT_EQ, testing::Invoke(), std::tr1::make_tuple(), testing::Action< F >::Perform(), Short(), and Ternary().

384  {
385  Action<int(int x, char y, short z)> a = // NOLINT
386  WithArgs<0, 1, 2>(Invoke(Ternary));
387  EXPECT_EQ(123, a.Perform(make_tuple(100, Char(20), Short(3))));
388 }
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
tuple make_tuple()
Definition: gtest-tuple.h:675
PolymorphicAction< internal::InvokeAction< FunctionImpl > > Invoke(FunctionImpl function_impl)
char a
testing::gmock_generated_actions_test::TEST ( WithArgsTest  ,
RepeatedArguments   
)

Definition at line 391 of file gmock-generated-actions_test.cc.

References a, EXPECT_EQ, testing::Invoke(), std::tr1::make_tuple(), testing::Action< F >::Perform(), and SumOf4().

391  {
392  Action<int(bool, int m, int n)> a = // NOLINT
393  WithArgs<1, 1, 1, 1>(Invoke(SumOf4));
394  EXPECT_EQ(4, a.Perform(make_tuple(false, 1, 10)));
395 }
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
tuple make_tuple()
Definition: gtest-tuple.h:675
PolymorphicAction< internal::InvokeAction< FunctionImpl > > Invoke(FunctionImpl function_impl)
char a
testing::gmock_generated_actions_test::TEST ( WithArgsTest  ,
ReversedArgumentOrder   
)

Definition at line 398 of file gmock-generated-actions_test.cc.

References a, Binary(), CharPtr(), EXPECT_EQ, testing::Invoke(), std::tr1::make_tuple(), testing::Action< F >::Perform(), s, and Short().

398  {
399  Action<const char*(short n, const char* input)> a = // NOLINT
400  WithArgs<1, 0>(Invoke(Binary));
401  const char s[] = "Hello";
402  EXPECT_EQ(s + 2, a.Perform(make_tuple(Short(2), CharPtr(s))));
403 }
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
const char * Binary(const char *input, short n)
tuple make_tuple()
Definition: gtest-tuple.h:675
PolymorphicAction< internal::InvokeAction< FunctionImpl > > Invoke(FunctionImpl function_impl)
char a
static set< string > s
testing::gmock_generated_actions_test::TEST ( WithArgsTest  ,
ArgsOfCompatibleTypes   
)

Definition at line 406 of file gmock-generated-actions_test.cc.

References a, Char(), EXPECT_EQ, testing::Invoke(), std::tr1::make_tuple(), testing::Action< F >::Perform(), Short(), and Ternary().

406  {
407  Action<long(short x, char y, double z, char c)> a = // NOLINT
408  WithArgs<0, 1, 3>(Invoke(Ternary));
409  EXPECT_EQ(123, a.Perform(make_tuple(Short(100), Char(20), 5.6, Char(3))));
410 }
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
tuple make_tuple()
Definition: gtest-tuple.h:675
PolymorphicAction< internal::InvokeAction< FunctionImpl > > Invoke(FunctionImpl function_impl)
char a
testing::gmock_generated_actions_test::TEST ( WithArgsTest  ,
VoidAction   
)

Definition at line 413 of file gmock-generated-actions_test.cc.

References a, EXPECT_TRUE, testing::Invoke(), std::tr1::make_tuple(), testing::Action< F >::Perform(), and VoidBinary().

413  {
414  Action<void(double x, char c, int n)> a = WithArgs<2, 1>(Invoke(VoidBinary));
415  g_done = false;
416  a.Perform(make_tuple(1.5, 'a', 3));
417  EXPECT_TRUE(g_done);
418 }
tuple make_tuple()
Definition: gtest-tuple.h:675
PolymorphicAction< internal::InvokeAction< FunctionImpl > > Invoke(FunctionImpl function_impl)
char a
#define EXPECT_TRUE(condition)
Definition: gtest.h:1859
testing::gmock_generated_actions_test::TEST ( DoAllTest  ,
TwoActions   
)

Definition at line 421 of file gmock-generated-actions_test.cc.

References a, testing::DoAll(), EXPECT_EQ, std::tr1::make_tuple(), testing::Action< F >::Perform(), and testing::Return().

421  {
422  int n = 0;
423  Action<int(int*)> a = DoAll(SetArgPointee<0>(1), // NOLINT
424  Return(2));
425  EXPECT_EQ(2, a.Perform(make_tuple(&n)));
426  EXPECT_EQ(1, n);
427 }
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
tuple make_tuple()
Definition: gtest-tuple.h:675
char a
internal::DoBothAction< Action1, Action2 > DoAll(Action1 a1, Action2 a2)
internal::ReturnAction< R > Return(R value)
testing::gmock_generated_actions_test::TEST ( DoAllTest  ,
ThreeActions   
)

Definition at line 430 of file gmock-generated-actions_test.cc.

References a, testing::DoAll(), EXPECT_EQ, m, std::tr1::make_tuple(), testing::Action< F >::Perform(), and testing::Return().

430  {
431  int m = 0, n = 0;
432  Action<int(int*, int*)> a = DoAll(SetArgPointee<0>(1), // NOLINT
433  SetArgPointee<1>(2),
434  Return(3));
435  EXPECT_EQ(3, a.Perform(make_tuple(&m, &n)));
436  EXPECT_EQ(1, m);
437  EXPECT_EQ(2, n);
438 }
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
tuple make_tuple()
Definition: gtest-tuple.h:675
static map< string, int > m
char a
internal::DoBothAction< Action1, Action2 > DoAll(Action1 a1, Action2 a2)
internal::ReturnAction< R > Return(R value)
testing::gmock_generated_actions_test::TEST ( DoAllTest  ,
FourActions   
)

Definition at line 441 of file gmock-generated-actions_test.cc.

References a, ch, testing::DoAll(), EXPECT_EQ, m, std::tr1::make_tuple(), testing::Action< F >::Perform(), and testing::Return().

441  {
442  int m = 0, n = 0;
443  char ch = '\0';
444  Action<int(int*, int*, char*)> a = // NOLINT
445  DoAll(SetArgPointee<0>(1),
446  SetArgPointee<1>(2),
447  SetArgPointee<2>('a'),
448  Return(3));
449  EXPECT_EQ(3, a.Perform(make_tuple(&m, &n, &ch)));
450  EXPECT_EQ(1, m);
451  EXPECT_EQ(2, n);
452  EXPECT_EQ('a', ch);
453 }
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
tuple make_tuple()
Definition: gtest-tuple.h:675
auto ch
static map< string, int > m
char a
internal::DoBothAction< Action1, Action2 > DoAll(Action1 a1, Action2 a2)
internal::ReturnAction< R > Return(R value)
testing::gmock_generated_actions_test::TEST ( DoAllTest  ,
FiveActions   
)

Definition at line 456 of file gmock-generated-actions_test.cc.

References a, upload::action, b, testing::DoAll(), EXPECT_EQ, m, std::tr1::make_tuple(), testing::Action< F >::Perform(), and testing::Return().

456  {
457  int m = 0, n = 0;
458  char a = '\0', b = '\0';
459  Action<int(int*, int*, char*, char*)> action = // NOLINT
460  DoAll(SetArgPointee<0>(1),
461  SetArgPointee<1>(2),
462  SetArgPointee<2>('a'),
463  SetArgPointee<3>('b'),
464  Return(3));
465  EXPECT_EQ(3, action.Perform(make_tuple(&m, &n, &a, &b)));
466  EXPECT_EQ(1, m);
467  EXPECT_EQ(2, n);
468  EXPECT_EQ('a', a);
469  EXPECT_EQ('b', b);
470 }
char b
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
tuple make_tuple()
Definition: gtest-tuple.h:675
static map< string, int > m
char a
internal::DoBothAction< Action1, Action2 > DoAll(Action1 a1, Action2 a2)
internal::ReturnAction< R > Return(R value)
action
Definition: upload.py:393
testing::gmock_generated_actions_test::TEST ( DoAllTest  ,
SixActions   
)

Definition at line 473 of file gmock-generated-actions_test.cc.

References a, upload::action, b, c, testing::DoAll(), EXPECT_EQ, m, std::tr1::make_tuple(), testing::Action< F >::Perform(), and testing::Return().

473  {
474  int m = 0, n = 0;
475  char a = '\0', b = '\0', c = '\0';
476  Action<int(int*, int*, char*, char*, char*)> action = // NOLINT
477  DoAll(SetArgPointee<0>(1),
478  SetArgPointee<1>(2),
479  SetArgPointee<2>('a'),
480  SetArgPointee<3>('b'),
481  SetArgPointee<4>('c'),
482  Return(3));
483  EXPECT_EQ(3, action.Perform(make_tuple(&m, &n, &a, &b, &c)));
484  EXPECT_EQ(1, m);
485  EXPECT_EQ(2, n);
486  EXPECT_EQ('a', a);
487  EXPECT_EQ('b', b);
488  EXPECT_EQ('c', c);
489 }
char b
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
tuple make_tuple()
Definition: gtest-tuple.h:675
static map< string, int > m
char a
internal::DoBothAction< Action1, Action2 > DoAll(Action1 a1, Action2 a2)
char c
internal::ReturnAction< R > Return(R value)
action
Definition: upload.py:393
testing::gmock_generated_actions_test::TEST ( DoAllTest  ,
SevenActions   
)

Definition at line 492 of file gmock-generated-actions_test.cc.

References a, upload::action, b, c, testing::DoAll(), EXPECT_EQ, m, std::tr1::make_tuple(), testing::Action< F >::Perform(), and testing::Return().

492  {
493  int m = 0, n = 0;
494  char a = '\0', b = '\0', c = '\0', d = '\0';
495  Action<int(int*, int*, char*, char*, char*, char*)> action = // NOLINT
496  DoAll(SetArgPointee<0>(1),
497  SetArgPointee<1>(2),
498  SetArgPointee<2>('a'),
499  SetArgPointee<3>('b'),
500  SetArgPointee<4>('c'),
501  SetArgPointee<5>('d'),
502  Return(3));
503  EXPECT_EQ(3, action.Perform(make_tuple(&m, &n, &a, &b, &c, &d)));
504  EXPECT_EQ(1, m);
505  EXPECT_EQ(2, n);
506  EXPECT_EQ('a', a);
507  EXPECT_EQ('b', b);
508  EXPECT_EQ('c', c);
509  EXPECT_EQ('d', d);
510 }
char b
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
tuple make_tuple()
Definition: gtest-tuple.h:675
static map< string, int > m
char a
internal::DoBothAction< Action1, Action2 > DoAll(Action1 a1, Action2 a2)
char c
internal::ReturnAction< R > Return(R value)
action
Definition: upload.py:393
testing::gmock_generated_actions_test::TEST ( DoAllTest  ,
EightActions   
)

Definition at line 513 of file gmock-generated-actions_test.cc.

References a, upload::action, b, c, testing::DoAll(), EXPECT_EQ, m, std::tr1::make_tuple(), testing::Action< F >::Perform(), and testing::Return().

513  {
514  int m = 0, n = 0;
515  char a = '\0', b = '\0', c = '\0', d = '\0', e = '\0';
516  Action<int(int*, int*, char*, char*, char*, char*, // NOLINT
517  char*)> action =
518  DoAll(SetArgPointee<0>(1),
519  SetArgPointee<1>(2),
520  SetArgPointee<2>('a'),
521  SetArgPointee<3>('b'),
522  SetArgPointee<4>('c'),
523  SetArgPointee<5>('d'),
524  SetArgPointee<6>('e'),
525  Return(3));
526  EXPECT_EQ(3, action.Perform(make_tuple(&m, &n, &a, &b, &c, &d, &e)));
527  EXPECT_EQ(1, m);
528  EXPECT_EQ(2, n);
529  EXPECT_EQ('a', a);
530  EXPECT_EQ('b', b);
531  EXPECT_EQ('c', c);
532  EXPECT_EQ('d', d);
533  EXPECT_EQ('e', e);
534 }
char b
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
tuple make_tuple()
Definition: gtest-tuple.h:675
boost::variant< DeliverAppData, WriteToSocket, ReportHandshakeSuccess, ReportEarlyHandshakeSuccess, ReportEarlyWriteFailed, ReportError, MutateState, WaitForData, NewCachedPsk > Action
Definition: Actions.h:79
static map< string, int > m
char a
internal::DoBothAction< Action1, Action2 > DoAll(Action1 a1, Action2 a2)
char c
internal::ReturnAction< R > Return(R value)
action
Definition: upload.py:393
testing::gmock_generated_actions_test::TEST ( DoAllTest  ,
NineActions   
)

Definition at line 537 of file gmock-generated-actions_test.cc.

References a, upload::action, b, c, testing::DoAll(), EXPECT_EQ, f, m, std::tr1::make_tuple(), testing::Action< F >::Perform(), and testing::Return().

537  {
538  int m = 0, n = 0;
539  char a = '\0', b = '\0', c = '\0', d = '\0', e = '\0', f = '\0';
540  Action<int(int*, int*, char*, char*, char*, char*, // NOLINT
541  char*, char*)> action =
542  DoAll(SetArgPointee<0>(1),
543  SetArgPointee<1>(2),
544  SetArgPointee<2>('a'),
545  SetArgPointee<3>('b'),
546  SetArgPointee<4>('c'),
547  SetArgPointee<5>('d'),
548  SetArgPointee<6>('e'),
549  SetArgPointee<7>('f'),
550  Return(3));
551  EXPECT_EQ(3, action.Perform(make_tuple(&m, &n, &a, &b, &c, &d, &e, &f)));
552  EXPECT_EQ(1, m);
553  EXPECT_EQ(2, n);
554  EXPECT_EQ('a', a);
555  EXPECT_EQ('b', b);
556  EXPECT_EQ('c', c);
557  EXPECT_EQ('d', d);
558  EXPECT_EQ('e', e);
559  EXPECT_EQ('f', f);
560 }
auto f
char b
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
tuple make_tuple()
Definition: gtest-tuple.h:675
boost::variant< DeliverAppData, WriteToSocket, ReportHandshakeSuccess, ReportEarlyHandshakeSuccess, ReportEarlyWriteFailed, ReportError, MutateState, WaitForData, NewCachedPsk > Action
Definition: Actions.h:79
static map< string, int > m
char a
internal::DoBothAction< Action1, Action2 > DoAll(Action1 a1, Action2 a2)
char c
internal::ReturnAction< R > Return(R value)
action
Definition: upload.py:393
testing::gmock_generated_actions_test::TEST ( DoAllTest  ,
TenActions   
)

Definition at line 563 of file gmock-generated-actions_test.cc.

References a, upload::action, b, c, testing::DoAll(), EXPECT_EQ, f, g(), m, std::tr1::make_tuple(), testing::Action< F >::Perform(), and testing::Return().

563  {
564  int m = 0, n = 0;
565  char a = '\0', b = '\0', c = '\0', d = '\0';
566  char e = '\0', f = '\0', g = '\0';
567  Action<int(int*, int*, char*, char*, char*, char*, // NOLINT
568  char*, char*, char*)> action =
569  DoAll(SetArgPointee<0>(1),
570  SetArgPointee<1>(2),
571  SetArgPointee<2>('a'),
572  SetArgPointee<3>('b'),
573  SetArgPointee<4>('c'),
574  SetArgPointee<5>('d'),
575  SetArgPointee<6>('e'),
576  SetArgPointee<7>('f'),
577  SetArgPointee<8>('g'),
578  Return(3));
579  EXPECT_EQ(3, action.Perform(make_tuple(&m, &n, &a, &b, &c, &d, &e, &f, &g)));
580  EXPECT_EQ(1, m);
581  EXPECT_EQ(2, n);
582  EXPECT_EQ('a', a);
583  EXPECT_EQ('b', b);
584  EXPECT_EQ('c', c);
585  EXPECT_EQ('d', d);
586  EXPECT_EQ('e', e);
587  EXPECT_EQ('f', f);
588  EXPECT_EQ('g', g);
589 }
auto f
char b
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
tuple make_tuple()
Definition: gtest-tuple.h:675
boost::variant< DeliverAppData, WriteToSocket, ReportHandshakeSuccess, ReportEarlyHandshakeSuccess, ReportEarlyWriteFailed, ReportError, MutateState, WaitForData, NewCachedPsk > Action
Definition: Actions.h:79
static map< string, int > m
char a
g_t g(f_t)
internal::DoBothAction< Action1, Action2 > DoAll(Action1 a1, Action2 a2)
char c
internal::ReturnAction< R > Return(R value)
action
Definition: upload.py:393
testing::gmock_generated_actions_test::TEST ( ActionMacroTest  ,
WorksWhenNotReferencingArguments   
)

Definition at line 607 of file gmock-generated-actions_test.cc.

References EXPECT_DOUBLE_EQ, EXPECT_EQ, std::tr1::make_tuple(), and testing::Action< F >::Perform().

607  {
608  Action<double()> a1 = Return5();
609  EXPECT_DOUBLE_EQ(5, a1.Perform(make_tuple()));
610 
611  Action<int(double, bool)> a2 = Return5();
612  EXPECT_EQ(5, a2.Perform(make_tuple(1, true)));
613 }
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
tuple make_tuple()
Definition: gtest-tuple.h:675
#define EXPECT_DOUBLE_EQ(val1, val2)
Definition: gtest.h:2031
testing::gmock_generated_actions_test::TEST ( ActionMacroTest  ,
WorksWhenReturningVoid   
)

Definition at line 618 of file gmock-generated-actions_test.cc.

References EXPECT_EQ, std::tr1::make_tuple(), and testing::Action< F >::Perform().

618  {
619  Action<void(int, int*)> a1 = IncrementArg1();
620  int n = 0;
621  a1.Perform(make_tuple(5, &n));
622  EXPECT_EQ(1, n);
623 }
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
tuple make_tuple()
Definition: gtest-tuple.h:675
testing::gmock_generated_actions_test::TEST ( ActionMacroTest  ,
CanReferenceArgumentType   
)

Definition at line 633 of file gmock-generated-actions_test.cc.

References EXPECT_EQ, std::tr1::make_tuple(), and testing::Action< F >::Perform().

633  {
634  Action<void(int, bool, int*)> a1 = IncrementArg2();
635  int n = 0;
636  a1.Perform(make_tuple(5, false, &n));
637  EXPECT_EQ(1, n);
638 }
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
tuple make_tuple()
Definition: gtest-tuple.h:675
testing::gmock_generated_actions_test::TEST ( ActionMacroTest  ,
CanReferenceArgumentTuple   
)

Definition at line 648 of file gmock-generated-actions_test.cc.

References Char(), dummy(), EXPECT_EQ, std::tr1::make_tuple(), and testing::Action< F >::Perform().

648  {
649  Action<int(int, char, int*)> a1 = Sum2();
650  int dummy = 0;
651  EXPECT_EQ(11, a1.Perform(make_tuple(5, Char(6), &dummy)));
652 }
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
tuple make_tuple()
Definition: gtest-tuple.h:675
void dummy()
testing::gmock_generated_actions_test::TEST ( ActionMacroTest  ,
CanReferenceMockFunctionType   
)

Definition at line 664 of file gmock-generated-actions_test.cc.

References EXPECT_EQ, std::tr1::make_tuple(), and testing::Action< F >::Perform().

664  {
665  Action<int(bool)> a1 = InvokeDummy();
666  EXPECT_EQ(1, a1.Perform(make_tuple(true)));
667  EXPECT_EQ(1, a1.Perform(make_tuple(false)));
668 }
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
tuple make_tuple()
Definition: gtest-tuple.h:675
testing::gmock_generated_actions_test::TEST ( ActionMacroTest  ,
CanReferenceMockFunctionReturnType   
)

Definition at line 678 of file gmock-generated-actions_test.cc.

References EXPECT_EQ, std::tr1::make_tuple(), and testing::Action< F >::Perform().

678  {
679  Action<int(bool)> a1 = InvokeDummy2();
680  EXPECT_EQ(1, a1.Perform(make_tuple(true)));
681  EXPECT_EQ(1, a1.Perform(make_tuple(false)));
682 }
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
tuple make_tuple()
Definition: gtest-tuple.h:675
testing::gmock_generated_actions_test::TEST ( ActionMacroTest  ,
WorksForConstReferenceArg   
)

Definition at line 690 of file gmock-generated-actions_test.cc.

References a, b, EXPECT_EQ, and testing::Action< F >::Perform().

690  {
691  Action<const bool*(int, const bool&)> a = ReturnAddrOfConstBoolReferenceArg();
692  const bool b = false;
693  EXPECT_EQ(&b, a.Perform(tuple<int, const bool&>(0, b)));
694 }
char b
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
char a
testing::gmock_generated_actions_test::TEST ( ActionMacroTest  ,
WorksForNonConstReferenceArg   
)

Definition at line 702 of file gmock-generated-actions_test.cc.

References a, EXPECT_EQ, and testing::Action< F >::Perform().

702  {
703  Action<int*(int&, bool, int)> a = ReturnAddrOfIntReferenceArg();
704  int n = 0;
705  EXPECT_EQ(&n, a.Perform(tuple<int&, bool, int>(n, true, 1)));
706 }
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
char a
testing::gmock_generated_actions_test::TEST ( ActionMacroTest  ,
WorksInNamespace   
)

Definition at line 713 of file gmock-generated-actions_test.cc.

References EXPECT_EQ, std::tr1::make_tuple(), and testing::Action< F >::Perform().

713  {
714  Action<int(int, int)> a1 = action_test::Sum();
715  EXPECT_EQ(3, a1.Perform(make_tuple(1, 2)));
716 }
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
tuple make_tuple()
Definition: gtest-tuple.h:675
testing::gmock_generated_actions_test::TEST ( ActionMacroTest  ,
WorksForDifferentArgumentNumbers   
)

Definition at line 722 of file gmock-generated-actions_test.cc.

References dummy(), EXPECT_DOUBLE_EQ, EXPECT_EQ, f, std::tr1::make_tuple(), and testing::Action< F >::Perform().

722  {
723  Action<int(int)> a1 = PlusTwo();
724  EXPECT_EQ(4, a1.Perform(make_tuple(2)));
725 
726  Action<double(float, void*)> a2 = PlusTwo();
727  int dummy;
728  EXPECT_DOUBLE_EQ(6, a2.Perform(make_tuple(4.0f, &dummy)));
729 }
auto f
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
tuple make_tuple()
Definition: gtest-tuple.h:675
void dummy()
#define EXPECT_DOUBLE_EQ(val1, val2)
Definition: gtest.h:2031
testing::gmock_generated_actions_test::TEST ( ActionPMacroTest  ,
DefinesParameterizedAction   
)

Definition at line 734 of file gmock-generated-actions_test.cc.

References EXPECT_EQ, std::tr1::make_tuple(), and testing::Action< F >::Perform().

734  {
735  Action<int(int m, bool t)> a1 = Plus(9);
736  EXPECT_EQ(10, a1.Perform(make_tuple(1, true)));
737 }
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
tuple make_tuple()
Definition: gtest-tuple.h:675
testing::gmock_generated_actions_test::TEST ( ActionPMacroTest  ,
CanReferenceArgumentAndParameterTypes   
)

Definition at line 747 of file gmock-generated-actions_test.cc.

References Char(), EXPECT_EQ, std::tr1::make_tuple(), and testing::Action< F >::Perform().

747  {
748  Action<int(char m, bool t)> a1 = TypedPlus(9);
749  EXPECT_EQ(10, a1.Perform(make_tuple(Char(1), true)));
750 }
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
tuple make_tuple()
Definition: gtest-tuple.h:675
testing::gmock_generated_actions_test::TEST ( ActionPMacroTest  ,
WorksInCompatibleMockFunction   
)

Definition at line 754 of file gmock-generated-actions_test.cc.

References EXPECT_EQ, testing::Action< F >::Perform(), and string.

754  {
755  Action<std::string(const std::string& s)> a1 = Plus("tail");
756  const std::string re = "re";
757  EXPECT_EQ("retail", a1.Perform(tuple<const std::string&>(re)));
758 }
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
const char * string
Definition: Conv.cpp:212
testing::gmock_generated_actions_test::TEST ( ActionMacroTest  ,
CanDefineOverloadedActions   
)

Definition at line 773 of file gmock-generated-actions_test.cc.

References CharPtr(), EXPECT_STREQ, and std::tr1::make_tuple().

773  {
774  typedef Action<const char*(bool, const char*)> MyAction;
775 
776  const MyAction a1 = OverloadedAction();
777  EXPECT_STREQ("hello", a1.Perform(make_tuple(false, CharPtr("world"))));
778  EXPECT_STREQ("world", a1.Perform(make_tuple(true, CharPtr("world"))));
779 
780  const MyAction a2 = OverloadedAction("hi");
781  EXPECT_STREQ("hi", a2.Perform(make_tuple(false, CharPtr("world"))));
782  EXPECT_STREQ("world", a2.Perform(make_tuple(true, CharPtr("world"))));
783 
784  const MyAction a3 = OverloadedAction("hi", "you");
785  EXPECT_STREQ("hi", a3.Perform(make_tuple(true, CharPtr("world"))));
786  EXPECT_STREQ("you", a3.Perform(make_tuple(false, CharPtr("world"))));
787 }
tuple make_tuple()
Definition: gtest-tuple.h:675
#define EXPECT_STREQ(s1, s2)
Definition: gtest.h:1995
testing::gmock_generated_actions_test::TEST ( ActionPnMacroTest  ,
WorksFor3Parameters   
)

Definition at line 793 of file gmock-generated-actions_test.cc.

References EXPECT_DOUBLE_EQ, EXPECT_EQ, std::tr1::make_tuple(), testing::Action< F >::Perform(), and string.

793  {
794  Action<double(int m, bool t)> a1 = Plus(100, 20, 3.4);
795  EXPECT_DOUBLE_EQ(3123.4, a1.Perform(make_tuple(3000, true)));
796 
797  Action<std::string(const std::string& s)> a2 = Plus("tail", "-", ">");
798  const std::string re = "re";
799  EXPECT_EQ("retail->", a2.Perform(tuple<const std::string&>(re)));
800 }
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
tuple make_tuple()
Definition: gtest-tuple.h:675
#define EXPECT_DOUBLE_EQ(val1, val2)
Definition: gtest.h:2031
const char * string
Definition: Conv.cpp:212
testing::gmock_generated_actions_test::TEST ( ActionPnMacroTest  ,
WorksFor4Parameters   
)

Definition at line 804 of file gmock-generated-actions_test.cc.

References EXPECT_EQ, std::tr1::make_tuple(), and testing::Action< F >::Perform().

804  {
805  Action<int(int)> a1 = Plus(1, 2, 3, 4);
806  EXPECT_EQ(10 + 1 + 2 + 3 + 4, a1.Perform(make_tuple(10)));
807 }
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
tuple make_tuple()
Definition: gtest-tuple.h:675
testing::gmock_generated_actions_test::TEST ( ActionPnMacroTest  ,
WorksFor5Parameters   
)

Definition at line 811 of file gmock-generated-actions_test.cc.

References EXPECT_EQ, std::tr1::make_tuple(), and testing::Action< F >::Perform().

811  {
812  Action<int(int)> a1 = Plus(1, 2, 3, 4, 5);
813  EXPECT_EQ(10 + 1 + 2 + 3 + 4 + 5, a1.Perform(make_tuple(10)));
814 }
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
tuple make_tuple()
Definition: gtest-tuple.h:675
testing::gmock_generated_actions_test::TEST ( ActionPnMacroTest  ,
WorksFor6Parameters   
)

Definition at line 820 of file gmock-generated-actions_test.cc.

References EXPECT_EQ, std::tr1::make_tuple(), and testing::Action< F >::Perform().

820  {
821  Action<int(int)> a1 = Plus(1, 2, 3, 4, 5, 6);
822  EXPECT_EQ(10 + 1 + 2 + 3 + 4 + 5 + 6, a1.Perform(make_tuple(10)));
823 }
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
tuple make_tuple()
Definition: gtest-tuple.h:675
testing::gmock_generated_actions_test::TEST ( ActionPnMacroTest  ,
WorksFor7Parameters   
)

Definition at line 829 of file gmock-generated-actions_test.cc.

References EXPECT_EQ, std::tr1::make_tuple(), and testing::Action< F >::Perform().

829  {
830  Action<int(int)> a1 = Plus(1, 2, 3, 4, 5, 6, 7);
831  EXPECT_EQ(10 + 1 + 2 + 3 + 4 + 5 + 6 + 7, a1.Perform(make_tuple(10)));
832 }
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
tuple make_tuple()
Definition: gtest-tuple.h:675
testing::gmock_generated_actions_test::TEST ( ActionPnMacroTest  ,
WorksFor8Parameters   
)

Definition at line 838 of file gmock-generated-actions_test.cc.

References EXPECT_EQ, std::tr1::make_tuple(), and testing::Action< F >::Perform().

838  {
839  Action<int(int)> a1 = Plus(1, 2, 3, 4, 5, 6, 7, 8);
840  EXPECT_EQ(10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8, a1.Perform(make_tuple(10)));
841 }
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
tuple make_tuple()
Definition: gtest-tuple.h:675
testing::gmock_generated_actions_test::TEST ( ActionPnMacroTest  ,
WorksFor9Parameters   
)

Definition at line 847 of file gmock-generated-actions_test.cc.

References EXPECT_EQ, std::tr1::make_tuple(), and testing::Action< F >::Perform().

847  {
848  Action<int(int)> a1 = Plus(1, 2, 3, 4, 5, 6, 7, 8, 9);
849  EXPECT_EQ(10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9, a1.Perform(make_tuple(10)));
850 }
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
tuple make_tuple()
Definition: gtest-tuple.h:675
testing::gmock_generated_actions_test::TEST ( ActionPnMacroTest  ,
WorksFor10Parameters   
)

Definition at line 858 of file gmock-generated-actions_test.cc.

References EXPECT_EQ, std::tr1::make_tuple(), and testing::Action< F >::Perform().

858  {
859  Action<int(int)> a1 = Plus(1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
860  EXPECT_EQ(10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10,
861  a1.Perform(make_tuple(10)));
862 }
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
tuple make_tuple()
Definition: gtest-tuple.h:675
testing::gmock_generated_actions_test::TEST ( ActionPnMacroTest  ,
SimpleTypePromotion   
)

Definition at line 873 of file gmock-generated-actions_test.cc.

References CharPtr(), EXPECT_EQ, std::tr1::make_tuple(), testing::Action< F >::Perform(), and string.

873  {
874  Action<std::string(const char*)> no_promo =
875  PadArgument(std::string("foo"), 'r');
876  Action<std::string(const char*)> promo =
877  PadArgument("foo", static_cast<int>('r'));
878  EXPECT_EQ("foobar", no_promo.Perform(make_tuple(CharPtr("ba"))));
879  EXPECT_EQ("foobar", promo.Perform(make_tuple(CharPtr("ba"))));
880 }
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
tuple make_tuple()
Definition: gtest-tuple.h:675
const char * string
Definition: Conv.cpp:212
testing::gmock_generated_actions_test::TEST ( ActionPnMacroTest  ,
CanPartiallyRestrictParameterTypes   
)

Definition at line 926 of file gmock-generated-actions_test.cc.

References Concat(), EXPECT_EQ, std::tr1::make_tuple(), and testing::Action< F >::Perform().

926  {
927  Action<const std::string()> a1 = Concat("Hello", "1", 2);
928  EXPECT_EQ("Hello12", a1.Perform(make_tuple()));
929 
930  a1 = Concat(1, 2, 3);
931  EXPECT_EQ("123", a1.Perform(make_tuple()));
932 }
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
tuple make_tuple()
Definition: gtest-tuple.h:675
ConcatImplActionP3< T1, int, T2 > Concat(T1 a, int b, T2 c)
testing::gmock_generated_actions_test::TEST ( ActionPnMacroTest  ,
TypesAreCorrect   
)

Definition at line 940 of file gmock-generated-actions_test.cc.

940  {
941  // DoFoo() must be assignable to a DoFooAction variable.
942  DoFooAction a0 = DoFoo();
943 
944  // DoFoo(1) must be assignable to a DoFooActionP variable.
945  DoFooActionP<int> a1 = DoFoo(1);
946 
947  // DoFoo(p1, ..., pk) must be assignable to a DoFooActionPk
948  // variable, and so on.
949  DoFooActionP2<int, char> a2 = DoFoo(1, '2');
950  PlusActionP3<int, int, char> a3 = Plus(1, 2, '3');
951  PlusActionP4<int, int, int, char> a4 = Plus(1, 2, 3, '4');
952  PlusActionP5<int, int, int, int, char> a5 = Plus(1, 2, 3, 4, '5');
953  PlusActionP6<int, int, int, int, int, char> a6 = Plus(1, 2, 3, 4, 5, '6');
954  PlusActionP7<int, int, int, int, int, int, char> a7 =
955  Plus(1, 2, 3, 4, 5, 6, '7');
956  PlusActionP8<int, int, int, int, int, int, int, char> a8 =
957  Plus(1, 2, 3, 4, 5, 6, 7, '8');
958  PlusActionP9<int, int, int, int, int, int, int, int, char> a9 =
959  Plus(1, 2, 3, 4, 5, 6, 7, 8, '9');
960  PlusActionP10<int, int, int, int, int, int, int, int, int, char> a10 =
961  Plus(1, 2, 3, 4, 5, 6, 7, 8, 9, '0');
962 
963  // Avoid "unused variable" warnings.
964  (void)a0;
965  (void)a1;
966  (void)a2;
967  (void)a3;
968  (void)a4;
969  (void)a5;
970  (void)a6;
971  (void)a7;
972  (void)a8;
973  (void)a9;
974  (void)a10;
975 }
testing::gmock_generated_actions_test::TEST ( ActionPnMacroTest  ,
CanExplicitlyInstantiateWithReferenceTypes   
)

Definition at line 987 of file gmock-generated-actions_test.cc.

References a, folly::empty(), EXPECT_EQ, std::tr1::make_tuple(), testing::Action< F >::Perform(), and x.

987  {
988  int x = 1, y = 2, z = 3;
989  const tuple<> empty = make_tuple();
990 
991  Action<int()> a = Plus1<int&>(x);
992  EXPECT_EQ(1, a.Perform(empty));
993 
994  a = Plus2<const int&, int&>(x, y);
995  EXPECT_EQ(3, a.Perform(empty));
996 
997  a = Plus3<int&, const int&, int&>(x, y, z);
998  EXPECT_EQ(6, a.Perform(empty));
999 
1000  int n[10] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
1001  a = Plus10<const int&, int&, const int&, int&, const int&, int&, const int&,
1002  int&, const int&, int&>(n[0], n[1], n[2], n[3], n[4], n[5], n[6], n[7],
1003  n[8], n[9]);
1004  EXPECT_EQ(55, a.Perform(empty));
1005 }
Definition: InvokeTest.cpp:58
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
const int x
tuple make_tuple()
Definition: gtest-tuple.h:675
constexpr auto empty(C const &c) -> decltype(c.empty())
Definition: Access.h:55
Definition: InvokeTest.cpp:72
char a
Definition: InvokeTest.cpp:65
testing::gmock_generated_actions_test::TEST ( ReturnNewTest  ,
NoArgs   
)

Definition at line 1014 of file gmock-generated-actions_test.cc.

References a, c, EXPECT_EQ, std::tr1::make_tuple(), and testing::Action< F >::Perform().

1014  {
1015  Action<NullaryConstructorClass*()> a = ReturnNew<NullaryConstructorClass>();
1016  NullaryConstructorClass* c = a.Perform(make_tuple());
1017  EXPECT_EQ(123, c->value_);
1018  delete c;
1019 }
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
tuple make_tuple()
Definition: gtest-tuple.h:675
char a
char c
testing::gmock_generated_actions_test::TEST ( ReturnNewTest  ,
Unary   
)

Definition at line 1028 of file gmock-generated-actions_test.cc.

References a, c, EXPECT_EQ, std::tr1::make_tuple(), and testing::Action< F >::Perform().

1028  {
1029  Action<UnaryConstructorClass*()> a = ReturnNew<UnaryConstructorClass>(4000);
1030  UnaryConstructorClass* c = a.Perform(make_tuple());
1031  EXPECT_EQ(4000, c->value_);
1032  delete c;
1033 }
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
tuple make_tuple()
Definition: gtest-tuple.h:675
char a
char c
testing::gmock_generated_actions_test::TEST ( ReturnNewTest  ,
UnaryWorksWhenMockMethodHasArgs   
)

Definition at line 1035 of file gmock-generated-actions_test.cc.

References a, c, EXPECT_EQ, std::tr1::make_tuple(), and testing::Action< F >::Perform().

1035  {
1036  Action<UnaryConstructorClass*(bool, int)> a =
1037  ReturnNew<UnaryConstructorClass>(4000);
1038  UnaryConstructorClass* c = a.Perform(make_tuple(false, 5));
1039  EXPECT_EQ(4000, c->value_);
1040  delete c;
1041 }
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
tuple make_tuple()
Definition: gtest-tuple.h:675
char a
char c
testing::gmock_generated_actions_test::TEST ( ReturnNewTest  ,
UnaryWorksWhenMockMethodReturnsPointerToConst   
)

Definition at line 1043 of file gmock-generated-actions_test.cc.

References a, c, EXPECT_EQ, std::tr1::make_tuple(), and testing::Action< F >::Perform().

1043  {
1044  Action<const UnaryConstructorClass*()> a =
1045  ReturnNew<UnaryConstructorClass>(4000);
1046  const UnaryConstructorClass* c = a.Perform(make_tuple());
1047  EXPECT_EQ(4000, c->value_);
1048  delete c;
1049 }
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
tuple make_tuple()
Definition: gtest-tuple.h:675
char a
char c
testing::gmock_generated_actions_test::TEST ( ReturnNewTest  ,
ConstructorThatTakes10Arguments   
)

Definition at line 1061 of file gmock-generated-actions_test.cc.

References a, c, EXPECT_EQ, std::tr1::make_tuple(), and testing::Action< F >::Perform().

1061  {
1062  Action<TenArgConstructorClass*()> a =
1063  ReturnNew<TenArgConstructorClass>(1000000000, 200000000, 30000000,
1064  4000000, 500000, 60000,
1065  7000, 800, 90, 0);
1066  TenArgConstructorClass* c = a.Perform(make_tuple());
1067  EXPECT_EQ(1234567890, c->value_);
1068  delete c;
1069 }
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
tuple make_tuple()
Definition: gtest-tuple.h:675
char a
char c
testing::gmock_generated_actions_test::TEST ( ActionTemplateTest  ,
WorksWithoutValueParam   
)

Definition at line 1078 of file gmock-generated-actions_test.cc.

References a, std::tr1::make_tuple(), and testing::Action< F >::Perform().

1078  {
1079  const Action<int*()> a = CreateNew<int>();
1080  int* p = a.Perform(make_tuple());
1081  delete p;
1082 }
tuple make_tuple()
Definition: gtest-tuple.h:675
char a
testing::gmock_generated_actions_test::TEST ( ActionTemplateTest  ,
WorksWithValueParams   
)

Definition at line 1091 of file gmock-generated-actions_test.cc.

References a, EXPECT_EQ, std::tr1::make_tuple(), and testing::Action< F >::Perform().

1091  {
1092  const Action<int*()> a = CreateNew<int>(42);
1093  int* p = a.Perform(make_tuple());
1094  EXPECT_EQ(42, *p);
1095  delete p;
1096 }
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
tuple make_tuple()
Definition: gtest-tuple.h:675
char a
testing::gmock_generated_actions_test::TEST ( ActionTemplateTest  ,
WorksForIntegralTemplateParams   
)

Definition at line 1114 of file gmock-generated-actions_test.cc.

References a, b, EXPECT_FALSE, std::tr1::make_tuple(), and testing::Action< F >::Perform().

1114  {
1115  const Action<void(int*, BoolResetter*)> a = MyDeleteArg<1>();
1116  int n = 0;
1117  bool b = true;
1118  BoolResetter* resetter = new BoolResetter(&b);
1119  a.Perform(make_tuple(&n, resetter));
1120  EXPECT_FALSE(b); // Verifies that resetter is deleted.
1121 }
char b
tuple make_tuple()
Definition: gtest-tuple.h:675
char a
#define EXPECT_FALSE(condition)
Definition: gtest.h:1862
testing::gmock_generated_actions_test::TEST ( ActionTemplateTest  ,
WorksForTemplateTemplateParameters   
)

Definition at line 1131 of file gmock-generated-actions_test.cc.

References a, EXPECT_EQ, and std::tr1::make_tuple().

1131  {
1132  using ::testing::internal::linked_ptr;
1133  const Action<linked_ptr<int>()> a = ReturnSmartPointer<linked_ptr>(42);
1134  linked_ptr<int> p = a.Perform(make_tuple());
1135  EXPECT_EQ(42, *p);
1136 }
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
tuple make_tuple()
Definition: gtest-tuple.h:675
char a
testing::gmock_generated_actions_test::TEST ( ActionTemplateTest  ,
WorksFor10TemplateParameters   
)

Definition at line 1163 of file gmock-generated-actions_test.cc.

References a, EXPECT_EQ, std::tr1::make_tuple(), and testing::Action< F >::Perform().

1163  {
1164  using ::testing::internal::linked_ptr;
1165  typedef GiantTemplate<linked_ptr<int>, bool, double, 5,
1166  true, 6, char, unsigned, int> Giant;
1167  const Action<Giant()> a = ReturnGiant<
1168  int, bool, double, 5, true, 6, char, unsigned, int, linked_ptr>(42);
1169  Giant giant = a.Perform(make_tuple());
1170  EXPECT_EQ(42, giant.value);
1171 }
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
tuple make_tuple()
Definition: gtest-tuple.h:675
char a
testing::gmock_generated_actions_test::TEST ( ActionTemplateTest  ,
WorksFor10ValueParameters   
)

Definition at line 1180 of file gmock-generated-actions_test.cc.

References a, EXPECT_EQ, std::tr1::make_tuple(), and testing::Action< F >::Perform().

1180  {
1181  const Action<int()> a = ReturnSum<int>(1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
1182  EXPECT_EQ(55, a.Perform(make_tuple()));
1183 }
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
tuple make_tuple()
Definition: gtest-tuple.h:675
char a
testing::gmock_generated_actions_test::TEST ( ActionTemplateTest  ,
CanBeOverloadedOnNumberOfValueParameters   
)

Definition at line 1210 of file gmock-generated-actions_test.cc.

References EXPECT_EQ, std::tr1::make_tuple(), and testing::Action< F >::Perform().

1210  {
1211  const Action<int()> a0 = ReturnSum();
1212  const Action<int()> a1 = ReturnSum(1);
1213  const Action<int()> a2 = ReturnSum<int>(1, 2);
1214  const Action<int()> a3 = ReturnSum<int>(1, 2, 3);
1215  const Action<int()> a4 = ReturnSum<int, 10000>(2000, 300, 40, 5);
1216  EXPECT_EQ(0, a0.Perform(make_tuple()));
1217  EXPECT_EQ(1, a1.Perform(make_tuple()));
1218  EXPECT_EQ(3, a2.Perform(make_tuple()));
1219  EXPECT_EQ(6, a3.Perform(make_tuple()));
1220  EXPECT_EQ(12345, a4.Perform(make_tuple()));
1221 }
#define EXPECT_EQ(val1, val2)
Definition: gtest.h:1922
tuple make_tuple()
Definition: gtest-tuple.h:675
void testing::gmock_generated_actions_test::VoidBinary ( int  ,
char   
)
void testing::gmock_generated_actions_test::VoidTernary ( int  ,
char  ,
bool   
)

Variable Documentation

bool testing::gmock_generated_actions_test::g_done = false
const double testing::gmock_generated_actions_test::g_double = 0