|
|
|
@ -129,170 +129,207 @@ |
|
|
|
|
|
|
|
|
|
// Declares the template parameters.
|
|
|
|
|
#define GMOCK_INTERNAL_DECL_HAS_1_TEMPLATE_PARAMS(kind0, name0) kind0 name0 |
|
|
|
|
#define GMOCK_INTERNAL_DECL_HAS_2_TEMPLATE_PARAMS(kind0, name0, kind1, \ |
|
|
|
|
name1) kind0 name0, kind1 name1 |
|
|
|
|
#define GMOCK_INTERNAL_DECL_HAS_2_TEMPLATE_PARAMS(kind0, name0, kind1, name1) \ |
|
|
|
|
kind0 name0, kind1 name1 |
|
|
|
|
#define GMOCK_INTERNAL_DECL_HAS_3_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \ |
|
|
|
|
kind2, name2) kind0 name0, kind1 name1, kind2 name2 |
|
|
|
|
kind2, name2) \
|
|
|
|
|
kind0 name0, kind1 name1, kind2 name2 |
|
|
|
|
#define GMOCK_INTERNAL_DECL_HAS_4_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \ |
|
|
|
|
kind2, name2, kind3, name3) kind0 name0, kind1 name1, kind2 name2, \
|
|
|
|
|
kind3 name3 |
|
|
|
|
#define GMOCK_INTERNAL_DECL_HAS_5_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \ |
|
|
|
|
kind2, name2, kind3, name3, kind4, name4) kind0 name0, kind1 name1, \
|
|
|
|
|
kind2 name2, kind3 name3, kind4 name4 |
|
|
|
|
kind2, name2, kind3, name3) \
|
|
|
|
|
kind0 name0, kind1 name1, kind2 name2, kind3 name3 |
|
|
|
|
#define GMOCK_INTERNAL_DECL_HAS_5_TEMPLATE_PARAMS( \ |
|
|
|
|
kind0, name0, kind1, name1, kind2, name2, kind3, name3, kind4, name4) \
|
|
|
|
|
kind0 name0, kind1 name1, kind2 name2, kind3 name3, kind4 name4 |
|
|
|
|
#define GMOCK_INTERNAL_DECL_HAS_6_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \ |
|
|
|
|
kind2, name2, kind3, name3, kind4, name4, kind5, name5) kind0 name0, \
|
|
|
|
|
kind1 name1, kind2 name2, kind3 name3, kind4 name4, kind5 name5 |
|
|
|
|
#define GMOCK_INTERNAL_DECL_HAS_7_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \ |
|
|
|
|
kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, \
|
|
|
|
|
name6) kind0 name0, kind1 name1, kind2 name2, kind3 name3, kind4 name4, \
|
|
|
|
|
kind5 name5, kind6 name6 |
|
|
|
|
#define GMOCK_INTERNAL_DECL_HAS_8_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \ |
|
|
|
|
kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, name6, \
|
|
|
|
|
kind7, name7) kind0 name0, kind1 name1, kind2 name2, kind3 name3, \
|
|
|
|
|
kind4 name4, kind5 name5, kind6 name6, kind7 name7 |
|
|
|
|
#define GMOCK_INTERNAL_DECL_HAS_9_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \ |
|
|
|
|
kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, name6, \
|
|
|
|
|
kind7, name7, kind8, name8) kind0 name0, kind1 name1, kind2 name2, \
|
|
|
|
|
kind3 name3, kind4 name4, kind5 name5, kind6 name6, kind7 name7, \
|
|
|
|
|
kind8 name8 |
|
|
|
|
#define GMOCK_INTERNAL_DECL_HAS_10_TEMPLATE_PARAMS(kind0, name0, kind1, \ |
|
|
|
|
name1, kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, \
|
|
|
|
|
name6, kind7, name7, kind8, name8, kind9, name9) kind0 name0, \
|
|
|
|
|
kind1 name1, kind2 name2, kind3 name3, kind4 name4, kind5 name5, \
|
|
|
|
|
kind6 name6, kind7 name7, kind8 name8, kind9 name9 |
|
|
|
|
kind2, name2, kind3, name3, \
|
|
|
|
|
kind4, name4, kind5, name5) \
|
|
|
|
|
kind0 name0, kind1 name1, kind2 name2, kind3 name3, kind4 name4, kind5 name5 |
|
|
|
|
#define GMOCK_INTERNAL_DECL_HAS_7_TEMPLATE_PARAMS( \ |
|
|
|
|
kind0, name0, kind1, name1, kind2, name2, kind3, name3, kind4, name4, \
|
|
|
|
|
kind5, name5, kind6, name6) \
|
|
|
|
|
kind0 name0, kind1 name1, kind2 name2, kind3 name3, kind4 name4, \
|
|
|
|
|
kind5 name5, kind6 name6 |
|
|
|
|
#define GMOCK_INTERNAL_DECL_HAS_8_TEMPLATE_PARAMS( \ |
|
|
|
|
kind0, name0, kind1, name1, kind2, name2, kind3, name3, kind4, name4, \
|
|
|
|
|
kind5, name5, kind6, name6, kind7, name7) \
|
|
|
|
|
kind0 name0, kind1 name1, kind2 name2, kind3 name3, kind4 name4, \
|
|
|
|
|
kind5 name5, kind6 name6, kind7 name7 |
|
|
|
|
#define GMOCK_INTERNAL_DECL_HAS_9_TEMPLATE_PARAMS( \ |
|
|
|
|
kind0, name0, kind1, name1, kind2, name2, kind3, name3, kind4, name4, \
|
|
|
|
|
kind5, name5, kind6, name6, kind7, name7, kind8, name8) \
|
|
|
|
|
kind0 name0, kind1 name1, kind2 name2, kind3 name3, kind4 name4, \
|
|
|
|
|
kind5 name5, kind6 name6, kind7 name7, kind8 name8 |
|
|
|
|
#define GMOCK_INTERNAL_DECL_HAS_10_TEMPLATE_PARAMS( \ |
|
|
|
|
kind0, name0, kind1, name1, kind2, name2, kind3, name3, kind4, name4, \
|
|
|
|
|
kind5, name5, kind6, name6, kind7, name7, kind8, name8, kind9, name9) \
|
|
|
|
|
kind0 name0, kind1 name1, kind2 name2, kind3 name3, kind4 name4, \
|
|
|
|
|
kind5 name5, kind6 name6, kind7 name7, kind8 name8, kind9 name9 |
|
|
|
|
|
|
|
|
|
// Lists the template parameters.
|
|
|
|
|
#define GMOCK_INTERNAL_LIST_HAS_1_TEMPLATE_PARAMS(kind0, name0) name0 |
|
|
|
|
#define GMOCK_INTERNAL_LIST_HAS_2_TEMPLATE_PARAMS(kind0, name0, kind1, \ |
|
|
|
|
name1) name0, name1 |
|
|
|
|
#define GMOCK_INTERNAL_LIST_HAS_2_TEMPLATE_PARAMS(kind0, name0, kind1, name1) \ |
|
|
|
|
name0, name1 |
|
|
|
|
#define GMOCK_INTERNAL_LIST_HAS_3_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \ |
|
|
|
|
kind2, name2) name0, name1, name2 |
|
|
|
|
kind2, name2) \
|
|
|
|
|
name0, name1, name2 |
|
|
|
|
#define GMOCK_INTERNAL_LIST_HAS_4_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \ |
|
|
|
|
kind2, name2, kind3, name3) name0, name1, name2, name3 |
|
|
|
|
#define GMOCK_INTERNAL_LIST_HAS_5_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \ |
|
|
|
|
kind2, name2, kind3, name3, kind4, name4) name0, name1, name2, name3, \
|
|
|
|
|
name4 |
|
|
|
|
kind2, name2, kind3, name3) \
|
|
|
|
|
name0, name1, name2, name3 |
|
|
|
|
#define GMOCK_INTERNAL_LIST_HAS_5_TEMPLATE_PARAMS( \ |
|
|
|
|
kind0, name0, kind1, name1, kind2, name2, kind3, name3, kind4, name4) \
|
|
|
|
|
name0, name1, name2, name3, name4 |
|
|
|
|
#define GMOCK_INTERNAL_LIST_HAS_6_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \ |
|
|
|
|
kind2, name2, kind3, name3, kind4, name4, kind5, name5) name0, name1, \
|
|
|
|
|
name2, name3, name4, name5 |
|
|
|
|
#define GMOCK_INTERNAL_LIST_HAS_7_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \ |
|
|
|
|
kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, \
|
|
|
|
|
name6) name0, name1, name2, name3, name4, name5, name6 |
|
|
|
|
#define GMOCK_INTERNAL_LIST_HAS_8_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \ |
|
|
|
|
kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, name6, \
|
|
|
|
|
kind7, name7) name0, name1, name2, name3, name4, name5, name6, name7 |
|
|
|
|
#define GMOCK_INTERNAL_LIST_HAS_9_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \ |
|
|
|
|
kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, name6, \
|
|
|
|
|
kind7, name7, kind8, name8) name0, name1, name2, name3, name4, name5, \
|
|
|
|
|
name6, name7, name8 |
|
|
|
|
#define GMOCK_INTERNAL_LIST_HAS_10_TEMPLATE_PARAMS(kind0, name0, kind1, \ |
|
|
|
|
name1, kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, \
|
|
|
|
|
name6, kind7, name7, kind8, name8, kind9, name9) name0, name1, name2, \
|
|
|
|
|
name3, name4, name5, name6, name7, name8, name9 |
|
|
|
|
kind2, name2, kind3, name3, \
|
|
|
|
|
kind4, name4, kind5, name5) \
|
|
|
|
|
name0, name1, name2, name3, name4, name5 |
|
|
|
|
#define GMOCK_INTERNAL_LIST_HAS_7_TEMPLATE_PARAMS( \ |
|
|
|
|
kind0, name0, kind1, name1, kind2, name2, kind3, name3, kind4, name4, \
|
|
|
|
|
kind5, name5, kind6, name6) \
|
|
|
|
|
name0, name1, name2, name3, name4, name5, name6 |
|
|
|
|
#define GMOCK_INTERNAL_LIST_HAS_8_TEMPLATE_PARAMS( \ |
|
|
|
|
kind0, name0, kind1, name1, kind2, name2, kind3, name3, kind4, name4, \
|
|
|
|
|
kind5, name5, kind6, name6, kind7, name7) \
|
|
|
|
|
name0, name1, name2, name3, name4, name5, name6, name7 |
|
|
|
|
#define GMOCK_INTERNAL_LIST_HAS_9_TEMPLATE_PARAMS( \ |
|
|
|
|
kind0, name0, kind1, name1, kind2, name2, kind3, name3, kind4, name4, \
|
|
|
|
|
kind5, name5, kind6, name6, kind7, name7, kind8, name8) \
|
|
|
|
|
name0, name1, name2, name3, name4, name5, name6, name7, name8 |
|
|
|
|
#define GMOCK_INTERNAL_LIST_HAS_10_TEMPLATE_PARAMS( \ |
|
|
|
|
kind0, name0, kind1, name1, kind2, name2, kind3, name3, kind4, name4, \
|
|
|
|
|
kind5, name5, kind6, name6, kind7, name7, kind8, name8, kind9, name9) \
|
|
|
|
|
name0, name1, name2, name3, name4, name5, name6, name7, name8, name9 |
|
|
|
|
|
|
|
|
|
// Declares the types of value parameters.
|
|
|
|
|
#define GMOCK_INTERNAL_DECL_TYPE_AND_0_VALUE_PARAMS() |
|
|
|
|
#define GMOCK_INTERNAL_DECL_TYPE_AND_1_VALUE_PARAMS(p0) , typename p0##_type |
|
|
|
|
#define GMOCK_INTERNAL_DECL_TYPE_AND_2_VALUE_PARAMS(p0, p1) , \ |
|
|
|
|
typename p0##_type, typename p1##_type |
|
|
|
|
#define GMOCK_INTERNAL_DECL_TYPE_AND_3_VALUE_PARAMS(p0, p1, p2) , \ |
|
|
|
|
typename p0##_type, typename p1##_type, typename p2##_type |
|
|
|
|
#define GMOCK_INTERNAL_DECL_TYPE_AND_4_VALUE_PARAMS(p0, p1, p2, p3) , \ |
|
|
|
|
typename p0##_type, typename p1##_type, typename p2##_type, \
|
|
|
|
|
typename p3##_type |
|
|
|
|
#define GMOCK_INTERNAL_DECL_TYPE_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4) , \ |
|
|
|
|
typename p0##_type, typename p1##_type, typename p2##_type, \
|
|
|
|
|
typename p3##_type, typename p4##_type |
|
|
|
|
#define GMOCK_INTERNAL_DECL_TYPE_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5) , \ |
|
|
|
|
typename p0##_type, typename p1##_type, typename p2##_type, \
|
|
|
|
|
typename p3##_type, typename p4##_type, typename p5##_type |
|
|
|
|
#define GMOCK_INTERNAL_DECL_TYPE_AND_2_VALUE_PARAMS(p0, p1) \ |
|
|
|
|
, typename p0##_type, typename p1##_type |
|
|
|
|
#define GMOCK_INTERNAL_DECL_TYPE_AND_3_VALUE_PARAMS(p0, p1, p2) \ |
|
|
|
|
, typename p0##_type, typename p1##_type, typename p2##_type |
|
|
|
|
#define GMOCK_INTERNAL_DECL_TYPE_AND_4_VALUE_PARAMS(p0, p1, p2, p3) \ |
|
|
|
|
, typename p0##_type, typename p1##_type, typename p2##_type, \
|
|
|
|
|
typename p3##_type |
|
|
|
|
#define GMOCK_INTERNAL_DECL_TYPE_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4) \ |
|
|
|
|
, typename p0##_type, typename p1##_type, typename p2##_type, \
|
|
|
|
|
typename p3##_type, typename p4##_type |
|
|
|
|
#define GMOCK_INTERNAL_DECL_TYPE_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5) \ |
|
|
|
|
, typename p0##_type, typename p1##_type, typename p2##_type, \
|
|
|
|
|
typename p3##_type, typename p4##_type, typename p5##_type |
|
|
|
|
#define GMOCK_INTERNAL_DECL_TYPE_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \ |
|
|
|
|
p6) , typename p0##_type, typename p1##_type, typename p2##_type, \
|
|
|
|
|
typename p3##_type, typename p4##_type, typename p5##_type, \
|
|
|
|
|
typename p6##_type |
|
|
|
|
p6) \
|
|
|
|
|
, typename p0##_type, typename p1##_type, typename p2##_type, \
|
|
|
|
|
typename p3##_type, typename p4##_type, typename p5##_type, \
|
|
|
|
|
typename p6##_type |
|
|
|
|
#define GMOCK_INTERNAL_DECL_TYPE_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \ |
|
|
|
|
p6, p7) , typename p0##_type, typename p1##_type, typename p2##_type, \
|
|
|
|
|
typename p3##_type, typename p4##_type, typename p5##_type, \
|
|
|
|
|
typename p6##_type, typename p7##_type |
|
|
|
|
p6, p7) \
|
|
|
|
|
, typename p0##_type, typename p1##_type, typename p2##_type, \
|
|
|
|
|
typename p3##_type, typename p4##_type, typename p5##_type, \
|
|
|
|
|
typename p6##_type, typename p7##_type |
|
|
|
|
#define GMOCK_INTERNAL_DECL_TYPE_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \ |
|
|
|
|
p6, p7, p8) , typename p0##_type, typename p1##_type, typename p2##_type, \
|
|
|
|
|
typename p3##_type, typename p4##_type, typename p5##_type, \
|
|
|
|
|
typename p6##_type, typename p7##_type, typename p8##_type |
|
|
|
|
p6, p7, p8) \
|
|
|
|
|
, typename p0##_type, typename p1##_type, typename p2##_type, \
|
|
|
|
|
typename p3##_type, typename p4##_type, typename p5##_type, \
|
|
|
|
|
typename p6##_type, typename p7##_type, typename p8##_type |
|
|
|
|
#define GMOCK_INTERNAL_DECL_TYPE_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \ |
|
|
|
|
p6, p7, p8, p9) , typename p0##_type, typename p1##_type, \
|
|
|
|
|
typename p2##_type, typename p3##_type, typename p4##_type, \
|
|
|
|
|
typename p5##_type, typename p6##_type, typename p7##_type, \
|
|
|
|
|
typename p8##_type, typename p9##_type |
|
|
|
|
p6, p7, p8, p9) \
|
|
|
|
|
, typename p0##_type, typename p1##_type, typename p2##_type, \
|
|
|
|
|
typename p3##_type, typename p4##_type, typename p5##_type, \
|
|
|
|
|
typename p6##_type, typename p7##_type, typename p8##_type, \
|
|
|
|
|
typename p9##_type |
|
|
|
|
|
|
|
|
|
// Initializes the value parameters.
|
|
|
|
|
#define GMOCK_INTERNAL_INIT_AND_0_VALUE_PARAMS()\ |
|
|
|
|
() |
|
|
|
|
#define GMOCK_INTERNAL_INIT_AND_1_VALUE_PARAMS(p0)\ |
|
|
|
|
(p0##_type gmock_p0) : p0(::std::move(gmock_p0)) |
|
|
|
|
#define GMOCK_INTERNAL_INIT_AND_2_VALUE_PARAMS(p0, p1)\ |
|
|
|
|
(p0##_type gmock_p0, p1##_type gmock_p1) : p0(::std::move(gmock_p0)), \
|
|
|
|
|
p1(::std::move(gmock_p1)) |
|
|
|
|
#define GMOCK_INTERNAL_INIT_AND_3_VALUE_PARAMS(p0, p1, p2)\ |
|
|
|
|
(p0##_type gmock_p0, p1##_type gmock_p1, \
|
|
|
|
|
p2##_type gmock_p2) : p0(::std::move(gmock_p0)), \
|
|
|
|
|
p1(::std::move(gmock_p1)), p2(::std::move(gmock_p2)) |
|
|
|
|
#define GMOCK_INTERNAL_INIT_AND_4_VALUE_PARAMS(p0, p1, p2, p3)\ |
|
|
|
|
(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
|
|
|
|
|
p3##_type gmock_p3) : p0(::std::move(gmock_p0)), \
|
|
|
|
|
p1(::std::move(gmock_p1)), p2(::std::move(gmock_p2)), \
|
|
|
|
|
#define GMOCK_INTERNAL_INIT_AND_0_VALUE_PARAMS() () |
|
|
|
|
#define GMOCK_INTERNAL_INIT_AND_1_VALUE_PARAMS(p0) \ |
|
|
|
|
(p0##_type gmock_p0) : p0(::std::move(gmock_p0)) |
|
|
|
|
#define GMOCK_INTERNAL_INIT_AND_2_VALUE_PARAMS(p0, p1) \ |
|
|
|
|
(p0##_type gmock_p0, p1##_type gmock_p1) \
|
|
|
|
|
: p0(::std::move(gmock_p0)), p1(::std::move(gmock_p1)) |
|
|
|
|
#define GMOCK_INTERNAL_INIT_AND_3_VALUE_PARAMS(p0, p1, p2) \ |
|
|
|
|
(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2) \
|
|
|
|
|
: p0(::std::move(gmock_p0)), \
|
|
|
|
|
p1(::std::move(gmock_p1)), \
|
|
|
|
|
p2(::std::move(gmock_p2)) |
|
|
|
|
#define GMOCK_INTERNAL_INIT_AND_4_VALUE_PARAMS(p0, p1, p2, p3) \ |
|
|
|
|
(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
|
|
|
|
|
p3##_type gmock_p3) \
|
|
|
|
|
: p0(::std::move(gmock_p0)), \
|
|
|
|
|
p1(::std::move(gmock_p1)), \
|
|
|
|
|
p2(::std::move(gmock_p2)), \
|
|
|
|
|
p3(::std::move(gmock_p3)) |
|
|
|
|
#define GMOCK_INTERNAL_INIT_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4)\ |
|
|
|
|
(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
|
|
|
|
|
p3##_type gmock_p3, p4##_type gmock_p4) : p0(::std::move(gmock_p0)), \
|
|
|
|
|
p1(::std::move(gmock_p1)), p2(::std::move(gmock_p2)), \
|
|
|
|
|
p3(::std::move(gmock_p3)), p4(::std::move(gmock_p4)) |
|
|
|
|
#define GMOCK_INTERNAL_INIT_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5)\ |
|
|
|
|
(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
|
|
|
|
|
p3##_type gmock_p3, p4##_type gmock_p4, \
|
|
|
|
|
p5##_type gmock_p5) : p0(::std::move(gmock_p0)), \
|
|
|
|
|
p1(::std::move(gmock_p1)), p2(::std::move(gmock_p2)), \
|
|
|
|
|
p3(::std::move(gmock_p3)), p4(::std::move(gmock_p4)), \
|
|
|
|
|
#define GMOCK_INTERNAL_INIT_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4) \ |
|
|
|
|
(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
|
|
|
|
|
p3##_type gmock_p3, p4##_type gmock_p4) \
|
|
|
|
|
: p0(::std::move(gmock_p0)), \
|
|
|
|
|
p1(::std::move(gmock_p1)), \
|
|
|
|
|
p2(::std::move(gmock_p2)), \
|
|
|
|
|
p3(::std::move(gmock_p3)), \
|
|
|
|
|
p4(::std::move(gmock_p4)) |
|
|
|
|
#define GMOCK_INTERNAL_INIT_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5) \ |
|
|
|
|
(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
|
|
|
|
|
p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5) \
|
|
|
|
|
: p0(::std::move(gmock_p0)), \
|
|
|
|
|
p1(::std::move(gmock_p1)), \
|
|
|
|
|
p2(::std::move(gmock_p2)), \
|
|
|
|
|
p3(::std::move(gmock_p3)), \
|
|
|
|
|
p4(::std::move(gmock_p4)), \
|
|
|
|
|
p5(::std::move(gmock_p5)) |
|
|
|
|
#define GMOCK_INTERNAL_INIT_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6)\ |
|
|
|
|
(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
|
|
|
|
|
p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
|
|
|
|
|
p6##_type gmock_p6) : p0(::std::move(gmock_p0)), \
|
|
|
|
|
p1(::std::move(gmock_p1)), p2(::std::move(gmock_p2)), \
|
|
|
|
|
p3(::std::move(gmock_p3)), p4(::std::move(gmock_p4)), \
|
|
|
|
|
p5(::std::move(gmock_p5)), p6(::std::move(gmock_p6)) |
|
|
|
|
#define GMOCK_INTERNAL_INIT_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7)\ |
|
|
|
|
(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
|
|
|
|
|
p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
|
|
|
|
|
p6##_type gmock_p6, p7##_type gmock_p7) : p0(::std::move(gmock_p0)), \
|
|
|
|
|
p1(::std::move(gmock_p1)), p2(::std::move(gmock_p2)), \
|
|
|
|
|
p3(::std::move(gmock_p3)), p4(::std::move(gmock_p4)), \
|
|
|
|
|
p5(::std::move(gmock_p5)), p6(::std::move(gmock_p6)), \
|
|
|
|
|
#define GMOCK_INTERNAL_INIT_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6) \ |
|
|
|
|
(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
|
|
|
|
|
p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
|
|
|
|
|
p6##_type gmock_p6) \
|
|
|
|
|
: p0(::std::move(gmock_p0)), \
|
|
|
|
|
p1(::std::move(gmock_p1)), \
|
|
|
|
|
p2(::std::move(gmock_p2)), \
|
|
|
|
|
p3(::std::move(gmock_p3)), \
|
|
|
|
|
p4(::std::move(gmock_p4)), \
|
|
|
|
|
p5(::std::move(gmock_p5)), \
|
|
|
|
|
p6(::std::move(gmock_p6)) |
|
|
|
|
#define GMOCK_INTERNAL_INIT_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7) \ |
|
|
|
|
(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
|
|
|
|
|
p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
|
|
|
|
|
p6##_type gmock_p6, p7##_type gmock_p7) \
|
|
|
|
|
: p0(::std::move(gmock_p0)), \
|
|
|
|
|
p1(::std::move(gmock_p1)), \
|
|
|
|
|
p2(::std::move(gmock_p2)), \
|
|
|
|
|
p3(::std::move(gmock_p3)), \
|
|
|
|
|
p4(::std::move(gmock_p4)), \
|
|
|
|
|
p5(::std::move(gmock_p5)), \
|
|
|
|
|
p6(::std::move(gmock_p6)), \
|
|
|
|
|
p7(::std::move(gmock_p7)) |
|
|
|
|
#define GMOCK_INTERNAL_INIT_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \ |
|
|
|
|
p7, p8)\
|
|
|
|
|
(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
|
|
|
|
|
p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
|
|
|
|
|
p6##_type gmock_p6, p7##_type gmock_p7, \
|
|
|
|
|
p8##_type gmock_p8) : p0(::std::move(gmock_p0)), \
|
|
|
|
|
p1(::std::move(gmock_p1)), p2(::std::move(gmock_p2)), \
|
|
|
|
|
p3(::std::move(gmock_p3)), p4(::std::move(gmock_p4)), \
|
|
|
|
|
p5(::std::move(gmock_p5)), p6(::std::move(gmock_p6)), \
|
|
|
|
|
p7(::std::move(gmock_p7)), p8(::std::move(gmock_p8)) |
|
|
|
|
#define GMOCK_INTERNAL_INIT_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, \ |
|
|
|
|
p8) \
|
|
|
|
|
(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
|
|
|
|
|
p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
|
|
|
|
|
p6##_type gmock_p6, p7##_type gmock_p7, p8##_type gmock_p8) \
|
|
|
|
|
: p0(::std::move(gmock_p0)), \
|
|
|
|
|
p1(::std::move(gmock_p1)), \
|
|
|
|
|
p2(::std::move(gmock_p2)), \
|
|
|
|
|
p3(::std::move(gmock_p3)), \
|
|
|
|
|
p4(::std::move(gmock_p4)), \
|
|
|
|
|
p5(::std::move(gmock_p5)), \
|
|
|
|
|
p6(::std::move(gmock_p6)), \
|
|
|
|
|
p7(::std::move(gmock_p7)), \
|
|
|
|
|
p8(::std::move(gmock_p8)) |
|
|
|
|
#define GMOCK_INTERNAL_INIT_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \ |
|
|
|
|
p7, p8, p9)\
|
|
|
|
|
(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
|
|
|
|
|
p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
|
|
|
|
|
p6##_type gmock_p6, p7##_type gmock_p7, p8##_type gmock_p8, \
|
|
|
|
|
p9##_type gmock_p9) : p0(::std::move(gmock_p0)), \
|
|
|
|
|
p1(::std::move(gmock_p1)), p2(::std::move(gmock_p2)), \
|
|
|
|
|
p3(::std::move(gmock_p3)), p4(::std::move(gmock_p4)), \
|
|
|
|
|
p5(::std::move(gmock_p5)), p6(::std::move(gmock_p6)), \
|
|
|
|
|
p7(::std::move(gmock_p7)), p8(::std::move(gmock_p8)), \
|
|
|
|
|
p7, p8, p9) \
|
|
|
|
|
(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \
|
|
|
|
|
p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \
|
|
|
|
|
p6##_type gmock_p6, p7##_type gmock_p7, p8##_type gmock_p8, \
|
|
|
|
|
p9##_type gmock_p9) \
|
|
|
|
|
: p0(::std::move(gmock_p0)), \
|
|
|
|
|
p1(::std::move(gmock_p1)), \
|
|
|
|
|
p2(::std::move(gmock_p2)), \
|
|
|
|
|
p3(::std::move(gmock_p3)), \
|
|
|
|
|
p4(::std::move(gmock_p4)), \
|
|
|
|
|
p5(::std::move(gmock_p5)), \
|
|
|
|
|
p6(::std::move(gmock_p6)), \
|
|
|
|
|
p7(::std::move(gmock_p7)), \
|
|
|
|
|
p8(::std::move(gmock_p8)), \
|
|
|
|
|
p9(::std::move(gmock_p9)) |
|
|
|
|
|
|
|
|
|
// Defines the copy constructor
|
|
|
|
|
#define GMOCK_INTERNAL_DEFN_COPY_AND_0_VALUE_PARAMS() \ |
|
|
|
|
{} // Avoid https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82134
|
|
|
|
|
{} // Avoid https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82134
|
|
|
|
|
#define GMOCK_INTERNAL_DEFN_COPY_AND_1_VALUE_PARAMS(...) = default; |
|
|
|
|
#define GMOCK_INTERNAL_DEFN_COPY_AND_2_VALUE_PARAMS(...) = default; |
|
|
|
|
#define GMOCK_INTERNAL_DEFN_COPY_AND_3_VALUE_PARAMS(...) = default; |
|
|
|
@ -307,30 +344,71 @@ |
|
|
|
|
// Declares the fields for storing the value parameters.
|
|
|
|
|
#define GMOCK_INTERNAL_DEFN_AND_0_VALUE_PARAMS() |
|
|
|
|
#define GMOCK_INTERNAL_DEFN_AND_1_VALUE_PARAMS(p0) p0##_type p0; |
|
|
|
|
#define GMOCK_INTERNAL_DEFN_AND_2_VALUE_PARAMS(p0, p1) p0##_type p0; \ |
|
|
|
|
p1##_type p1; |
|
|
|
|
#define GMOCK_INTERNAL_DEFN_AND_3_VALUE_PARAMS(p0, p1, p2) p0##_type p0; \ |
|
|
|
|
p1##_type p1; p2##_type p2; |
|
|
|
|
#define GMOCK_INTERNAL_DEFN_AND_4_VALUE_PARAMS(p0, p1, p2, p3) p0##_type p0; \ |
|
|
|
|
p1##_type p1; p2##_type p2; p3##_type p3; |
|
|
|
|
#define GMOCK_INTERNAL_DEFN_AND_5_VALUE_PARAMS(p0, p1, p2, p3, \ |
|
|
|
|
p4) p0##_type p0; p1##_type p1; p2##_type p2; p3##_type p3; p4##_type p4; |
|
|
|
|
#define GMOCK_INTERNAL_DEFN_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, \ |
|
|
|
|
p5) p0##_type p0; p1##_type p1; p2##_type p2; p3##_type p3; p4##_type p4; \
|
|
|
|
|
p5##_type p5; |
|
|
|
|
#define GMOCK_INTERNAL_DEFN_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \ |
|
|
|
|
p6) p0##_type p0; p1##_type p1; p2##_type p2; p3##_type p3; p4##_type p4; \
|
|
|
|
|
p5##_type p5; p6##_type p6; |
|
|
|
|
#define GMOCK_INTERNAL_DEFN_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \ |
|
|
|
|
p7) p0##_type p0; p1##_type p1; p2##_type p2; p3##_type p3; p4##_type p4; \
|
|
|
|
|
p5##_type p5; p6##_type p6; p7##_type p7; |
|
|
|
|
#define GMOCK_INTERNAL_DEFN_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \ |
|
|
|
|
p7, p8) p0##_type p0; p1##_type p1; p2##_type p2; p3##_type p3; \
|
|
|
|
|
p4##_type p4; p5##_type p5; p6##_type p6; p7##_type p7; p8##_type p8; |
|
|
|
|
#define GMOCK_INTERNAL_DEFN_AND_2_VALUE_PARAMS(p0, p1) \ |
|
|
|
|
p0##_type p0; \
|
|
|
|
|
p1##_type p1; |
|
|
|
|
#define GMOCK_INTERNAL_DEFN_AND_3_VALUE_PARAMS(p0, p1, p2) \ |
|
|
|
|
p0##_type p0; \
|
|
|
|
|
p1##_type p1; \
|
|
|
|
|
p2##_type p2; |
|
|
|
|
#define GMOCK_INTERNAL_DEFN_AND_4_VALUE_PARAMS(p0, p1, p2, p3) \ |
|
|
|
|
p0##_type p0; \
|
|
|
|
|
p1##_type p1; \
|
|
|
|
|
p2##_type p2; \
|
|
|
|
|
p3##_type p3; |
|
|
|
|
#define GMOCK_INTERNAL_DEFN_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4) \ |
|
|
|
|
p0##_type p0; \
|
|
|
|
|
p1##_type p1; \
|
|
|
|
|
p2##_type p2; \
|
|
|
|
|
p3##_type p3; \
|
|
|
|
|
p4##_type p4; |
|
|
|
|
#define GMOCK_INTERNAL_DEFN_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5) \ |
|
|
|
|
p0##_type p0; \
|
|
|
|
|
p1##_type p1; \
|
|
|
|
|
p2##_type p2; \
|
|
|
|
|
p3##_type p3; \
|
|
|
|
|
p4##_type p4; \
|
|
|
|
|
p5##_type p5; |
|
|
|
|
#define GMOCK_INTERNAL_DEFN_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6) \ |
|
|
|
|
p0##_type p0; \
|
|
|
|
|
p1##_type p1; \
|
|
|
|
|
p2##_type p2; \
|
|
|
|
|
p3##_type p3; \
|
|
|
|
|
p4##_type p4; \
|
|
|
|
|
p5##_type p5; \
|
|
|
|
|
p6##_type p6; |
|
|
|
|
#define GMOCK_INTERNAL_DEFN_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7) \ |
|
|
|
|
p0##_type p0; \
|
|
|
|
|
p1##_type p1; \
|
|
|
|
|
p2##_type p2; \
|
|
|
|
|
p3##_type p3; \
|
|
|
|
|
p4##_type p4; \
|
|
|
|
|
p5##_type p5; \
|
|
|
|
|
p6##_type p6; \
|
|
|
|
|
p7##_type p7; |
|
|
|
|
#define GMOCK_INTERNAL_DEFN_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, \ |
|
|
|
|
p8) \
|
|
|
|
|
p0##_type p0; \
|
|
|
|
|
p1##_type p1; \
|
|
|
|
|
p2##_type p2; \
|
|
|
|
|
p3##_type p3; \
|
|
|
|
|
p4##_type p4; \
|
|
|
|
|
p5##_type p5; \
|
|
|
|
|
p6##_type p6; \
|
|
|
|
|
p7##_type p7; \
|
|
|
|
|
p8##_type p8; |
|
|
|
|
#define GMOCK_INTERNAL_DEFN_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \ |
|
|
|
|
p7, p8, p9) p0##_type p0; p1##_type p1; p2##_type p2; p3##_type p3; \
|
|
|
|
|
p4##_type p4; p5##_type p5; p6##_type p6; p7##_type p7; p8##_type p8; \
|
|
|
|
|
p9##_type p9; |
|
|
|
|
p7, p8, p9) \
|
|
|
|
|
p0##_type p0; \
|
|
|
|
|
p1##_type p1; \
|
|
|
|
|
p2##_type p2; \
|
|
|
|
|
p3##_type p3; \
|
|
|
|
|
p4##_type p4; \
|
|
|
|
|
p5##_type p5; \
|
|
|
|
|
p6##_type p6; \
|
|
|
|
|
p7##_type p7; \
|
|
|
|
|
p8##_type p8; \
|
|
|
|
|
p9##_type p9; |
|
|
|
|
|
|
|
|
|
// Lists the value parameters.
|
|
|
|
|
#define GMOCK_INTERNAL_LIST_AND_0_VALUE_PARAMS() |
|
|
|
@ -338,72 +416,78 @@ |
|
|
|
|
#define GMOCK_INTERNAL_LIST_AND_2_VALUE_PARAMS(p0, p1) p0, p1 |
|
|
|
|
#define GMOCK_INTERNAL_LIST_AND_3_VALUE_PARAMS(p0, p1, p2) p0, p1, p2 |
|
|
|
|
#define GMOCK_INTERNAL_LIST_AND_4_VALUE_PARAMS(p0, p1, p2, p3) p0, p1, p2, p3 |
|
|
|
|
#define GMOCK_INTERNAL_LIST_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4) p0, p1, \ |
|
|
|
|
p2, p3, p4 |
|
|
|
|
#define GMOCK_INTERNAL_LIST_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5) p0, \ |
|
|
|
|
p1, p2, p3, p4, p5 |
|
|
|
|
#define GMOCK_INTERNAL_LIST_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \ |
|
|
|
|
p6) p0, p1, p2, p3, p4, p5, p6 |
|
|
|
|
#define GMOCK_INTERNAL_LIST_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \ |
|
|
|
|
p7) p0, p1, p2, p3, p4, p5, p6, p7 |
|
|
|
|
#define GMOCK_INTERNAL_LIST_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \ |
|
|
|
|
p7, p8) p0, p1, p2, p3, p4, p5, p6, p7, p8 |
|
|
|
|
#define GMOCK_INTERNAL_LIST_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4) \ |
|
|
|
|
p0, p1, p2, p3, p4 |
|
|
|
|
#define GMOCK_INTERNAL_LIST_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5) \ |
|
|
|
|
p0, p1, p2, p3, p4, p5 |
|
|
|
|
#define GMOCK_INTERNAL_LIST_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6) \ |
|
|
|
|
p0, p1, p2, p3, p4, p5, p6 |
|
|
|
|
#define GMOCK_INTERNAL_LIST_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7) \ |
|
|
|
|
p0, p1, p2, p3, p4, p5, p6, p7 |
|
|
|
|
#define GMOCK_INTERNAL_LIST_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, \ |
|
|
|
|
p8) \
|
|
|
|
|
p0, p1, p2, p3, p4, p5, p6, p7, p8 |
|
|
|
|
#define GMOCK_INTERNAL_LIST_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \ |
|
|
|
|
p7, p8, p9) p0, p1, p2, p3, p4, p5, p6, p7, p8, p9 |
|
|
|
|
p7, p8, p9) \
|
|
|
|
|
p0, p1, p2, p3, p4, p5, p6, p7, p8, p9 |
|
|
|
|
|
|
|
|
|
// Lists the value parameter types.
|
|
|
|
|
#define GMOCK_INTERNAL_LIST_TYPE_AND_0_VALUE_PARAMS() |
|
|
|
|
#define GMOCK_INTERNAL_LIST_TYPE_AND_1_VALUE_PARAMS(p0) , p0##_type |
|
|
|
|
#define GMOCK_INTERNAL_LIST_TYPE_AND_2_VALUE_PARAMS(p0, p1) , p0##_type, \ |
|
|
|
|
p1##_type |
|
|
|
|
#define GMOCK_INTERNAL_LIST_TYPE_AND_3_VALUE_PARAMS(p0, p1, p2) , p0##_type, \ |
|
|
|
|
p1##_type, p2##_type |
|
|
|
|
#define GMOCK_INTERNAL_LIST_TYPE_AND_4_VALUE_PARAMS(p0, p1, p2, p3) , \ |
|
|
|
|
p0##_type, p1##_type, p2##_type, p3##_type |
|
|
|
|
#define GMOCK_INTERNAL_LIST_TYPE_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4) , \ |
|
|
|
|
p0##_type, p1##_type, p2##_type, p3##_type, p4##_type |
|
|
|
|
#define GMOCK_INTERNAL_LIST_TYPE_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5) , \ |
|
|
|
|
p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, p5##_type |
|
|
|
|
#define GMOCK_INTERNAL_LIST_TYPE_AND_2_VALUE_PARAMS(p0, p1) \ |
|
|
|
|
, p0##_type, p1##_type |
|
|
|
|
#define GMOCK_INTERNAL_LIST_TYPE_AND_3_VALUE_PARAMS(p0, p1, p2) \ |
|
|
|
|
, p0##_type, p1##_type, p2##_type |
|
|
|
|
#define GMOCK_INTERNAL_LIST_TYPE_AND_4_VALUE_PARAMS(p0, p1, p2, p3) \ |
|
|
|
|
, p0##_type, p1##_type, p2##_type, p3##_type |
|
|
|
|
#define GMOCK_INTERNAL_LIST_TYPE_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4) \ |
|
|
|
|
, p0##_type, p1##_type, p2##_type, p3##_type, p4##_type |
|
|
|
|
#define GMOCK_INTERNAL_LIST_TYPE_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5) \ |
|
|
|
|
, p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, p5##_type |
|
|
|
|
#define GMOCK_INTERNAL_LIST_TYPE_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \ |
|
|
|
|
p6) , p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, p5##_type, \
|
|
|
|
|
p6##_type |
|
|
|
|
p6) \
|
|
|
|
|
, p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, p5##_type, p6##_type |
|
|
|
|
#define GMOCK_INTERNAL_LIST_TYPE_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \ |
|
|
|
|
p6, p7) , p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
|
|
|
|
|
p5##_type, p6##_type, p7##_type |
|
|
|
|
p6, p7) \
|
|
|
|
|
, p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, p5##_type, \
|
|
|
|
|
p6##_type, p7##_type |
|
|
|
|
#define GMOCK_INTERNAL_LIST_TYPE_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \ |
|
|
|
|
p6, p7, p8) , p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
|
|
|
|
|
p5##_type, p6##_type, p7##_type, p8##_type |
|
|
|
|
p6, p7, p8) \
|
|
|
|
|
, p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, p5##_type, \
|
|
|
|
|
p6##_type, p7##_type, p8##_type |
|
|
|
|
#define GMOCK_INTERNAL_LIST_TYPE_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \ |
|
|
|
|
p6, p7, p8, p9) , p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \
|
|
|
|
|
p5##_type, p6##_type, p7##_type, p8##_type, p9##_type |
|
|
|
|
p6, p7, p8, p9) \
|
|
|
|
|
, p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, p5##_type, \
|
|
|
|
|
p6##_type, p7##_type, p8##_type, p9##_type |
|
|
|
|
|
|
|
|
|
// Declares the value parameters.
|
|
|
|
|
#define GMOCK_INTERNAL_DECL_AND_0_VALUE_PARAMS() |
|
|
|
|
#define GMOCK_INTERNAL_DECL_AND_1_VALUE_PARAMS(p0) p0##_type p0 |
|
|
|
|
#define GMOCK_INTERNAL_DECL_AND_2_VALUE_PARAMS(p0, p1) p0##_type p0, \ |
|
|
|
|
p1##_type p1 |
|
|
|
|
#define GMOCK_INTERNAL_DECL_AND_3_VALUE_PARAMS(p0, p1, p2) p0##_type p0, \ |
|
|
|
|
p1##_type p1, p2##_type p2 |
|
|
|
|
#define GMOCK_INTERNAL_DECL_AND_4_VALUE_PARAMS(p0, p1, p2, p3) p0##_type p0, \ |
|
|
|
|
p1##_type p1, p2##_type p2, p3##_type p3 |
|
|
|
|
#define GMOCK_INTERNAL_DECL_AND_5_VALUE_PARAMS(p0, p1, p2, p3, \ |
|
|
|
|
p4) p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4 |
|
|
|
|
#define GMOCK_INTERNAL_DECL_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, \ |
|
|
|
|
p5) p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4, \
|
|
|
|
|
p5##_type p5 |
|
|
|
|
#define GMOCK_INTERNAL_DECL_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \ |
|
|
|
|
p6) p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4, \
|
|
|
|
|
p5##_type p5, p6##_type p6 |
|
|
|
|
#define GMOCK_INTERNAL_DECL_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \ |
|
|
|
|
p7) p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4, \
|
|
|
|
|
p5##_type p5, p6##_type p6, p7##_type p7 |
|
|
|
|
#define GMOCK_INTERNAL_DECL_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \ |
|
|
|
|
p7, p8) p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \
|
|
|
|
|
p4##_type p4, p5##_type p5, p6##_type p6, p7##_type p7, p8##_type p8 |
|
|
|
|
#define GMOCK_INTERNAL_DECL_AND_2_VALUE_PARAMS(p0, p1) \ |
|
|
|
|
p0##_type p0, p1##_type p1 |
|
|
|
|
#define GMOCK_INTERNAL_DECL_AND_3_VALUE_PARAMS(p0, p1, p2) \ |
|
|
|
|
p0##_type p0, p1##_type p1, p2##_type p2 |
|
|
|
|
#define GMOCK_INTERNAL_DECL_AND_4_VALUE_PARAMS(p0, p1, p2, p3) \ |
|
|
|
|
p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3 |
|
|
|
|
#define GMOCK_INTERNAL_DECL_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4) \ |
|
|
|
|
p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4 |
|
|
|
|
#define GMOCK_INTERNAL_DECL_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5) \ |
|
|
|
|
p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4, \
|
|
|
|
|
p5##_type p5 |
|
|
|
|
#define GMOCK_INTERNAL_DECL_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6) \ |
|
|
|
|
p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4, \
|
|
|
|
|
p5##_type p5, p6##_type p6 |
|
|
|
|
#define GMOCK_INTERNAL_DECL_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7) \ |
|
|
|
|
p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4, \
|
|
|
|
|
p5##_type p5, p6##_type p6, p7##_type p7 |
|
|
|
|
#define GMOCK_INTERNAL_DECL_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, \ |
|
|
|
|
p8) \
|
|
|
|
|
p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4, \
|
|
|
|
|
p5##_type p5, p6##_type p6, p7##_type p7, p8##_type p8 |
|
|
|
|
#define GMOCK_INTERNAL_DECL_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \ |
|
|
|
|
p7, p8, p9) p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \
|
|
|
|
|
p4##_type p4, p5##_type p5, p6##_type p6, p7##_type p7, p8##_type p8, \
|
|
|
|
|
p9##_type p9 |
|
|
|
|
p7, p8, p9) \
|
|
|
|
|
p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4, \
|
|
|
|
|
p5##_type p5, p6##_type p6, p7##_type p7, p8##_type p8, p9##_type p9 |
|
|
|
|
|
|
|
|
|
// The suffix of the class template implementing the action template.
|
|
|
|
|
#define GMOCK_INTERNAL_COUNT_AND_0_VALUE_PARAMS() |
|
|
|
@ -415,40 +499,43 @@ |
|
|
|
|
#define GMOCK_INTERNAL_COUNT_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5) P6 |
|
|
|
|
#define GMOCK_INTERNAL_COUNT_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6) P7 |
|
|
|
|
#define GMOCK_INTERNAL_COUNT_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \ |
|
|
|
|
p7) P8 |
|
|
|
|
p7) \
|
|
|
|
|
P8 |
|
|
|
|
#define GMOCK_INTERNAL_COUNT_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \ |
|
|
|
|
p7, p8) P9 |
|
|
|
|
p7, p8) \
|
|
|
|
|
P9 |
|
|
|
|
#define GMOCK_INTERNAL_COUNT_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \ |
|
|
|
|
p7, p8, p9) P10 |
|
|
|
|
p7, p8, p9) \
|
|
|
|
|
P10 |
|
|
|
|
|
|
|
|
|
// The name of the class template implementing the action template.
|
|
|
|
|
#define GMOCK_ACTION_CLASS_(name, value_params)\ |
|
|
|
|
GTEST_CONCAT_TOKEN_(name##Action, GMOCK_INTERNAL_COUNT_##value_params) |
|
|
|
|
#define GMOCK_ACTION_CLASS_(name, value_params) \ |
|
|
|
|
GTEST_CONCAT_TOKEN_(name##Action, GMOCK_INTERNAL_COUNT_##value_params) |
|
|
|
|
|
|
|
|
|
#define ACTION_TEMPLATE(name, template_params, value_params) \ |
|
|
|
|
template <GMOCK_INTERNAL_DECL_##template_params \
|
|
|
|
|
GMOCK_INTERNAL_DECL_TYPE_##value_params> \
|
|
|
|
|
GMOCK_INTERNAL_DECL_TYPE_##value_params> \
|
|
|
|
|
class GMOCK_ACTION_CLASS_(name, value_params) { \
|
|
|
|
|
public: \
|
|
|
|
|
explicit GMOCK_ACTION_CLASS_(name, value_params)( \
|
|
|
|
|
GMOCK_INTERNAL_DECL_##value_params) \
|
|
|
|
|
GMOCK_PP_IF(GMOCK_PP_IS_EMPTY(GMOCK_INTERNAL_COUNT_##value_params), \
|
|
|
|
|
= default; , \
|
|
|
|
|
= default; \
|
|
|
|
|
, \
|
|
|
|
|
: impl_(std::make_shared<gmock_Impl>( \
|
|
|
|
|
GMOCK_INTERNAL_LIST_##value_params)) { }) \
|
|
|
|
|
GMOCK_ACTION_CLASS_(name, value_params)( \
|
|
|
|
|
const GMOCK_ACTION_CLASS_(name, value_params)&) noexcept \
|
|
|
|
|
GMOCK_INTERNAL_DEFN_COPY_##value_params \
|
|
|
|
|
GMOCK_ACTION_CLASS_(name, value_params)( \
|
|
|
|
|
GMOCK_ACTION_CLASS_(name, value_params)&&) noexcept \
|
|
|
|
|
GMOCK_INTERNAL_DEFN_COPY_##value_params \
|
|
|
|
|
template <typename F> \
|
|
|
|
|
operator ::testing::Action<F>() const { \
|
|
|
|
|
GMOCK_INTERNAL_LIST_##value_params)){}) \
|
|
|
|
|
GMOCK_ACTION_CLASS_(name, value_params)(const GMOCK_ACTION_CLASS_( \
|
|
|
|
|
name, value_params) &) noexcept GMOCK_INTERNAL_DEFN_COPY_ \
|
|
|
|
|
##value_params GMOCK_ACTION_CLASS_(name, value_params)( \ |
|
|
|
|
GMOCK_ACTION_CLASS_(name, value_params) &&) noexcept \
|
|
|
|
|
GMOCK_INTERNAL_DEFN_COPY_##value_params template <typename F> \
|
|
|
|
|
operator ::testing::Action<F>() const { \
|
|
|
|
|
return GMOCK_PP_IF( \
|
|
|
|
|
GMOCK_PP_IS_EMPTY(GMOCK_INTERNAL_COUNT_##value_params), \
|
|
|
|
|
(::testing::internal::MakeAction<F, gmock_Impl>()), \
|
|
|
|
|
(::testing::internal::MakeAction<F>(impl_))); \
|
|
|
|
|
(::testing::internal::MakeAction<F, gmock_Impl>()), \
|
|
|
|
|
(::testing::internal::MakeAction<F>(impl_))); \
|
|
|
|
|
} \
|
|
|
|
|
\
|
|
|
|
|
private: \
|
|
|
|
|
class gmock_Impl { \
|
|
|
|
|
public: \
|
|
|
|
@ -458,34 +545,35 @@ |
|
|
|
|
return_type gmock_PerformImpl(GMOCK_ACTION_ARG_TYPES_AND_NAMES_) const; \
|
|
|
|
|
GMOCK_INTERNAL_DEFN_##value_params \
|
|
|
|
|
}; \
|
|
|
|
|
GMOCK_PP_IF(GMOCK_PP_IS_EMPTY(GMOCK_INTERNAL_COUNT_##value_params), \
|
|
|
|
|
, std::shared_ptr<const gmock_Impl> impl_;) \
|
|
|
|
|
GMOCK_PP_IF(GMOCK_PP_IS_EMPTY(GMOCK_INTERNAL_COUNT_##value_params), , \
|
|
|
|
|
std::shared_ptr<const gmock_Impl> impl_;) \
|
|
|
|
|
}; \
|
|
|
|
|
template <GMOCK_INTERNAL_DECL_##template_params \
|
|
|
|
|
GMOCK_INTERNAL_DECL_TYPE_##value_params> \
|
|
|
|
|
GMOCK_ACTION_CLASS_(name, value_params)< \
|
|
|
|
|
GMOCK_INTERNAL_LIST_##template_params \
|
|
|
|
|
GMOCK_INTERNAL_LIST_TYPE_##value_params> name( \
|
|
|
|
|
GMOCK_INTERNAL_DECL_##value_params) GTEST_MUST_USE_RESULT_; \
|
|
|
|
|
GMOCK_INTERNAL_DECL_TYPE_##value_params> \
|
|
|
|
|
GMOCK_ACTION_CLASS_( \
|
|
|
|
|
name, value_params)<GMOCK_INTERNAL_LIST_##template_params \
|
|
|
|
|
GMOCK_INTERNAL_LIST_TYPE_##value_params> \
|
|
|
|
|
name(GMOCK_INTERNAL_DECL_##value_params) GTEST_MUST_USE_RESULT_; \
|
|
|
|
|
template <GMOCK_INTERNAL_DECL_##template_params \
|
|
|
|
|
GMOCK_INTERNAL_DECL_TYPE_##value_params> \
|
|
|
|
|
inline GMOCK_ACTION_CLASS_(name, value_params)< \
|
|
|
|
|
GMOCK_INTERNAL_LIST_##template_params \
|
|
|
|
|
GMOCK_INTERNAL_LIST_TYPE_##value_params> name( \
|
|
|
|
|
GMOCK_INTERNAL_DECL_##value_params) { \
|
|
|
|
|
return GMOCK_ACTION_CLASS_(name, value_params)< \
|
|
|
|
|
GMOCK_INTERNAL_LIST_##template_params \
|
|
|
|
|
GMOCK_INTERNAL_LIST_TYPE_##value_params>( \
|
|
|
|
|
GMOCK_INTERNAL_LIST_##value_params); \
|
|
|
|
|
GMOCK_INTERNAL_DECL_TYPE_##value_params> \
|
|
|
|
|
inline GMOCK_ACTION_CLASS_( \
|
|
|
|
|
name, value_params)<GMOCK_INTERNAL_LIST_##template_params \
|
|
|
|
|
GMOCK_INTERNAL_LIST_TYPE_##value_params> \
|
|
|
|
|
name(GMOCK_INTERNAL_DECL_##value_params) { \
|
|
|
|
|
return GMOCK_ACTION_CLASS_( \
|
|
|
|
|
name, value_params)<GMOCK_INTERNAL_LIST_##template_params \
|
|
|
|
|
GMOCK_INTERNAL_LIST_TYPE_##value_params>( \
|
|
|
|
|
GMOCK_INTERNAL_LIST_##value_params); \
|
|
|
|
|
} \
|
|
|
|
|
template <GMOCK_INTERNAL_DECL_##template_params \
|
|
|
|
|
GMOCK_INTERNAL_DECL_TYPE_##value_params> \
|
|
|
|
|
GMOCK_INTERNAL_DECL_TYPE_##value_params> \
|
|
|
|
|
template <typename function_type, typename return_type, typename args_type, \
|
|
|
|
|
GMOCK_ACTION_TEMPLATE_ARGS_NAMES_> \
|
|
|
|
|
return_type GMOCK_ACTION_CLASS_(name, value_params)< \
|
|
|
|
|
GMOCK_INTERNAL_LIST_##template_params \
|
|
|
|
|
GMOCK_INTERNAL_LIST_TYPE_##value_params>::gmock_Impl::gmock_PerformImpl( \
|
|
|
|
|
GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const |
|
|
|
|
return_type GMOCK_ACTION_CLASS_( \
|
|
|
|
|
name, value_params)<GMOCK_INTERNAL_LIST_##template_params \
|
|
|
|
|
GMOCK_INTERNAL_LIST_TYPE_##value_params>:: \
|
|
|
|
|
gmock_Impl::gmock_PerformImpl(GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) \
|
|
|
|
|
const |
|
|
|
|
|
|
|
|
|
namespace testing { |
|
|
|
|
|
|
|
|
@ -495,8 +583,8 @@ namespace testing { |
|
|
|
|
// is expanded and macro expansion cannot contain #pragma. Therefore
|
|
|
|
|
// we suppress them here.
|
|
|
|
|
#ifdef _MSC_VER |
|
|
|
|
# pragma warning(push) |
|
|
|
|
# pragma warning(disable:4100) |
|
|
|
|
#pragma warning(push) |
|
|
|
|
#pragma warning(disable : 4100) |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
namespace internal { |
|
|
|
@ -565,7 +653,7 @@ InvokeArgument(Params&&... params) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#ifdef _MSC_VER |
|
|
|
|
# pragma warning(pop) |
|
|
|
|
#pragma warning(pop) |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
} // namespace testing
|
|
|
|
|