From 85b46b454b7c45c4e7c38f26faba89b042fbc96e Mon Sep 17 00:00:00 2001 From: "John \"Juce\" Bruce" Date: Thu, 9 Apr 2015 12:28:39 -0700 Subject: [PATCH] Widevine CDM Now Goes to Eleven (This is a merge of http://go/wvgerrit/13980) Adding origins to Android is going to push the number of arguments to GenerateKeyRequest over the maximum allowed by gMock. This change increases the maximum to 11 in order to continue supporting us. Bug: 19771858 Change-Id: Id04609d70da194f1491573b1b4aa9c23a67b78ab --- libwvdrmengine/test/gmock/README.android | 5 + .../include/gmock/gmock-generated-actions.h | 383 +++++++++++++++--- .../gmock/gmock-generated-actions.h.pump | 4 +- .../gmock/gmock-generated-function-mockers.h | 101 +++++ .../gmock-generated-function-mockers.h.pump | 2 +- .../include/gmock/gmock-generated-matchers.h | 302 ++++++++++++-- .../gmock/gmock-generated-matchers.h.pump | 2 +- .../gmock/gmock-generated-nice-strict.h | 35 +- .../gmock/gmock-generated-nice-strict.h.pump | 2 +- .../internal/gmock-generated-internal-utils.h | 24 ++ .../gmock-generated-internal-utils.h.pump | 2 +- 11 files changed, 761 insertions(+), 101 deletions(-) diff --git a/libwvdrmengine/test/gmock/README.android b/libwvdrmengine/test/gmock/README.android index e7053cc7..b51f5112 100644 --- a/libwvdrmengine/test/gmock/README.android +++ b/libwvdrmengine/test/gmock/README.android @@ -14,6 +14,11 @@ needs a different format of build script, and it needs to build against the OS' modified version of gTest, rather than the packaged version. Local Modifications: +--Thu Apr 3, 2015 (juce)-- + +Modified the Pump files to increase the maximum arity to 11, and ran Pump on +them to regenerate the headers. + --Tue Jun 3, 2014 (joeyparrish)-- Removed DOS newlines for the sake of the git-to-piper bridge. Piper converts diff --git a/libwvdrmengine/test/gmock/include/gmock/gmock-generated-actions.h b/libwvdrmengine/test/gmock/include/gmock/gmock-generated-actions.h index 2327393d..5520c95a 100644 --- a/libwvdrmengine/test/gmock/include/gmock/gmock-generated-actions.h +++ b/libwvdrmengine/test/gmock/include/gmock/gmock-generated-actions.h @@ -1,4 +1,6 @@ -// This file was GENERATED by a script. DO NOT EDIT BY HAND!!! +// This file was GENERATED by command: +// pump.py gmock-generated-actions.h.pump +// DO NOT EDIT BY HAND!!! // Copyright 2007, Google Inc. // All rights reserved. @@ -282,6 +284,33 @@ class InvokeHelper +class InvokeHelper > { + public: + template + static R Invoke(Function function, const ::std::tr1::tuple& args) { + using ::std::tr1::get; + return function(get<0>(args), get<1>(args), get<2>(args), get<3>(args), + get<4>(args), get<5>(args), get<6>(args), get<7>(args), get<8>(args), + get<9>(args), get<10>(args)); + } + + template + static R InvokeMethod(Class* obj_ptr, + MethodPtr method_ptr, + const ::std::tr1::tuple& args) { + using ::std::tr1::get; + return (obj_ptr->*method_ptr)(get<0>(args), get<1>(args), get<2>(args), + get<3>(args), get<4>(args), get<5>(args), get<6>(args), get<7>(args), + get<8>(args), get<9>(args), get<10>(args)); + } +}; + // CallableHelper has static methods for invoking "callables", // i.e. function pointers and functors. It uses overloading to // provide a uniform interface for invoking different kinds of @@ -381,6 +410,15 @@ class CallableHelper { A7 a7, A8 a8, A9 a9, A10 a10) { return function(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10); } + + // Calls a 11-ary callable. + template + static R Call(Function function, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, + A7 a7, A8 a8, A9 a9, A10 a10, A11 a11) { + return function(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11); + } }; // class CallableHelper // An INTERNAL macro for extracting the type of a tuple field. It's @@ -403,11 +441,11 @@ class CallableHelper { // returns ::std::tr1::tuple (2.5, true). // // The numbers in list k1, k2, ..., k_n must be >= 0, where n can be -// in the range [0, 10]. Duplicates are allowed and they don't have +// in the range [0, 11]. Duplicates are allowed and they don't have // to be in an ascending or descending order. template + int k4, int k5, int k6, int k7, int k8, int k9, int k10, int k11> class SelectArgs { public: typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1), @@ -415,19 +453,19 @@ class SelectArgs { GMOCK_FIELD_(ArgumentTuple, k4), GMOCK_FIELD_(ArgumentTuple, k5), GMOCK_FIELD_(ArgumentTuple, k6), GMOCK_FIELD_(ArgumentTuple, k7), GMOCK_FIELD_(ArgumentTuple, k8), GMOCK_FIELD_(ArgumentTuple, k9), - GMOCK_FIELD_(ArgumentTuple, k10)); + GMOCK_FIELD_(ArgumentTuple, k10), GMOCK_FIELD_(ArgumentTuple, k11)); typedef typename Function::ArgumentTuple SelectedArgs; static SelectedArgs Select(const ArgumentTuple& args) { using ::std::tr1::get; return SelectedArgs(get(args), get(args), get(args), get(args), get(args), get(args), get(args), - get(args), get(args), get(args)); + get(args), get(args), get(args), get(args)); } }; template class SelectArgs { + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1> { public: typedef Result type(); typedef typename Function::ArgumentTuple SelectedArgs; @@ -439,7 +477,7 @@ class SelectArgs class SelectArgs { + k1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1> { public: typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1)); typedef typename Function::ArgumentTuple SelectedArgs; @@ -451,7 +489,7 @@ class SelectArgs class SelectArgs { + k1, k2, -1, -1, -1, -1, -1, -1, -1, -1, -1> { public: typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1), GMOCK_FIELD_(ArgumentTuple, k2)); @@ -464,7 +502,7 @@ class SelectArgs class SelectArgs { + k1, k2, k3, -1, -1, -1, -1, -1, -1, -1, -1> { public: typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1), GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3)); @@ -478,7 +516,7 @@ class SelectArgs class SelectArgs { + k1, k2, k3, k4, -1, -1, -1, -1, -1, -1, -1> { public: typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1), GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3), @@ -494,7 +532,7 @@ class SelectArgs class SelectArgs { + k1, k2, k3, k4, k5, -1, -1, -1, -1, -1, -1> { public: typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1), GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3), @@ -510,7 +548,7 @@ class SelectArgs class SelectArgs { + k1, k2, k3, k4, k5, k6, -1, -1, -1, -1, -1> { public: typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1), GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3), @@ -527,7 +565,7 @@ class SelectArgs class SelectArgs { + k1, k2, k3, k4, k5, k6, k7, -1, -1, -1, -1> { public: typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1), GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3), @@ -544,7 +582,7 @@ class SelectArgs class SelectArgs { + k1, k2, k3, k4, k5, k6, k7, k8, -1, -1, -1> { public: typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1), GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3), @@ -563,7 +601,7 @@ class SelectArgs class SelectArgs { + k1, k2, k3, k4, k5, k6, k7, k8, k9, -1, -1> { public: typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1), GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3), @@ -579,12 +617,32 @@ class SelectArgs +class SelectArgs { + public: + typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1), + GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3), + GMOCK_FIELD_(ArgumentTuple, k4), GMOCK_FIELD_(ArgumentTuple, k5), + GMOCK_FIELD_(ArgumentTuple, k6), GMOCK_FIELD_(ArgumentTuple, k7), + GMOCK_FIELD_(ArgumentTuple, k8), GMOCK_FIELD_(ArgumentTuple, k9), + GMOCK_FIELD_(ArgumentTuple, k10)); + typedef typename Function::ArgumentTuple SelectedArgs; + static SelectedArgs Select(const ArgumentTuple& args) { + using ::std::tr1::get; + return SelectedArgs(get(args), get(args), get(args), + get(args), get(args), get(args), get(args), + get(args), get(args), get(args)); + } +}; + #undef GMOCK_FIELD_ // Implements the WithArgs action. template + int k9 = -1, int k10 = -1, int k11 = -1> class WithArgsAction { public: explicit WithArgsAction(const InnerAction& action) : action_(action) {} @@ -603,12 +661,12 @@ class WithArgsAction { virtual Result Perform(const ArgumentTuple& args) { return action_.Perform(SelectArgs::Select(args)); + k5, k6, k7, k8, k9, k10, k11>::Select(args)); } private: typedef typename SelectArgs::type InnerFunctionType; + k1, k2, k3, k4, k5, k6, k7, k8, k9, k10, k11>::type InnerFunctionType; Action action_; }; @@ -643,7 +701,7 @@ class ActionHelper { return impl->template gmock_PerformImpl<>(args, ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), - ExcessiveArg()); + ExcessiveArg(), ExcessiveArg()); } template @@ -652,7 +710,7 @@ class ActionHelper { return impl->template gmock_PerformImpl(args, get<0>(args), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), - ExcessiveArg()); + ExcessiveArg(), ExcessiveArg()); } template @@ -661,7 +719,7 @@ class ActionHelper { return impl->template gmock_PerformImpl(args, get<0>(args), get<1>(args), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), - ExcessiveArg()); + ExcessiveArg(), ExcessiveArg()); } template @@ -670,7 +728,7 @@ class ActionHelper { return impl->template gmock_PerformImpl(args, get<0>(args), get<1>(args), get<2>(args), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), - ExcessiveArg()); + ExcessiveArg(), ExcessiveArg()); } template @@ -680,7 +738,7 @@ class ActionHelper { return impl->template gmock_PerformImpl(args, get<0>(args), get<1>(args), get<2>(args), get<3>(args), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), - ExcessiveArg()); + ExcessiveArg(), ExcessiveArg()); } template @@ -690,7 +748,7 @@ class ActionHelper { return impl->template gmock_PerformImpl(args, get<0>(args), get<1>(args), get<2>(args), get<3>(args), get<4>(args), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), - ExcessiveArg()); + ExcessiveArg(), ExcessiveArg()); } template template gmock_PerformImpl(args, get<0>(args), get<1>(args), get<2>(args), get<3>(args), get<4>(args), get<5>(args), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), - ExcessiveArg()); + ExcessiveArg(), ExcessiveArg()); } template template gmock_PerformImpl(args, get<0>(args), get<1>(args), get<2>(args), get<3>(args), get<4>(args), get<5>(args), get<6>(args), ExcessiveArg(), ExcessiveArg(), - ExcessiveArg()); + ExcessiveArg(), ExcessiveArg()); } template template gmock_PerformImpl(args, get<0>(args), get<1>(args), get<2>(args), get<3>(args), get<4>(args), get<5>(args), get<6>(args), get<7>(args), ExcessiveArg(), - ExcessiveArg()); + ExcessiveArg(), ExcessiveArg()); } template template gmock_PerformImpl(args, get<0>(args), get<1>(args), get<2>(args), get<3>(args), get<4>(args), get<5>(args), get<6>(args), get<7>(args), get<8>(args), - ExcessiveArg()); + ExcessiveArg(), ExcessiveArg()); } template template gmock_PerformImpl(args, get<0>(args), get<1>(args), get<2>(args), get<3>(args), get<4>(args), get<5>(args), get<6>(args), get<7>(args), get<8>(args), - get<9>(args)); + get<9>(args), ExcessiveArg()); + } + + template + static Result Perform(Impl* impl, const ::std::tr1::tuple& args) { + using ::std::tr1::get; + return impl->template gmock_PerformImpl(args, get<0>(args), get<1>(args), get<2>(args), get<3>(args), + get<4>(args), get<5>(args), get<6>(args), get<7>(args), get<8>(args), + get<9>(args), get<10>(args)); } }; @@ -827,6 +897,15 @@ WithArgs(const InnerAction& action) { k9, k10>(action); } +template +inline internal::WithArgsAction +WithArgs(const InnerAction& action) { + return internal::WithArgsAction(action); +} + // Creates an action that does actions a1, a2, ..., sequentially in // each invocation. template @@ -917,6 +996,20 @@ DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6, return DoAll(a1, DoAll(a2, a3, a4, a5, a6, a7, a8, a9, a10)); } +template +inline internal::DoBothAction > > > > > > > > > +DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6, + Action7 a7, Action8 a8, Action9 a9, Action10 a10, Action11 a11) { + return DoAll(a1, DoAll(a2, a3, a4, a5, a6, a7, a8, a9, a10, a11)); +} + } // namespace testing // The ACTION* family of macros can be used in a namespace scope to @@ -968,7 +1061,7 @@ DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6, // ACTION_P(Add, n) above, you can write 'n_type' to refer to the type // of 'n'. // -// We also provide ACTION_P2, ACTION_P3, ..., up to ACTION_P10 to support +// We also provide ACTION_P2, ACTION_P3, ..., up to ACTION_P11 to support // multi-parameter actions. // // For the purpose of typing, you can view @@ -1027,7 +1120,8 @@ DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6, arg6_type arg6 GTEST_ATTRIBUTE_UNUSED_, \ arg7_type arg7 GTEST_ATTRIBUTE_UNUSED_, \ arg8_type arg8 GTEST_ATTRIBUTE_UNUSED_, \ - arg9_type arg9 GTEST_ATTRIBUTE_UNUSED_ + arg9_type arg9 GTEST_ATTRIBUTE_UNUSED_, \ + arg10_type arg10 GTEST_ATTRIBUTE_UNUSED_ // Sometimes you want to give an action explicit template parameters // that cannot be inferred from its value parameters. ACTION() and @@ -1143,6 +1237,12 @@ DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6, 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 +#define GMOCK_INTERNAL_DECL_HAS_11_TEMPLATE_PARAMS(kind0, name0, kind1, \ + name1, kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, \ + name6, kind7, name7, kind8, name8, kind9, name9, kind10, \ + name10) kind0 name0, kind1 name1, kind2 name2, kind3 name3, kind4 name4, \ + kind5 name5, kind6 name6, kind7 name7, kind8 name8, kind9 name9, \ + kind10 name10 // Lists the template parameters. #define GMOCK_INTERNAL_LIST_HAS_1_TEMPLATE_PARAMS(kind0, name0) name0 @@ -1172,6 +1272,10 @@ DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6, 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 +#define GMOCK_INTERNAL_LIST_HAS_11_TEMPLATE_PARAMS(kind0, name0, kind1, \ + name1, kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, \ + name6, kind7, name7, kind8, name8, kind9, name9, kind10, name10) name0, \ + name1, name2, name3, name4, name5, name6, name7, name8, name9, name10 // Declares the types of value parameters. #define GMOCK_INTERNAL_DECL_TYPE_AND_0_VALUE_PARAMS() @@ -1206,6 +1310,11 @@ DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6, typename p2##_type, typename p3##_type, typename p4##_type, \ typename p5##_type, typename p6##_type, typename p7##_type, \ typename p8##_type, typename p9##_type +#define GMOCK_INTERNAL_DECL_TYPE_AND_11_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \ + p6, p7, p8, p9, p10) , 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, typename p10##_type // Initializes the value parameters. #define GMOCK_INTERNAL_INIT_AND_0_VALUE_PARAMS()\ @@ -1257,6 +1366,15 @@ DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6, p9##_type gmock_p9) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \ p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), p7(gmock_p7), \ p8(gmock_p8), p9(gmock_p9) +#define GMOCK_INTERNAL_INIT_AND_11_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \ + p7, p8, p9, p10)\ + (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, p10##_type gmock_p10) : p0(gmock_p0), \ + p1(gmock_p1), p2(gmock_p2), p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), \ + p6(gmock_p6), p7(gmock_p7), p8(gmock_p8), p9(gmock_p9), \ + p10(gmock_p10) // Declares the fields for storing the value parameters. #define GMOCK_INTERNAL_DEFN_AND_0_VALUE_PARAMS() @@ -1285,6 +1403,10 @@ DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6, 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; +#define GMOCK_INTERNAL_DEFN_AND_11_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \ + p7, p8, p9, p10) 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; p10##_type p10; // Lists the value parameters. #define GMOCK_INTERNAL_LIST_AND_0_VALUE_PARAMS() @@ -1304,6 +1426,8 @@ DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6, 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 +#define GMOCK_INTERNAL_LIST_AND_11_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \ + p7, p8, p9, p10) p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10 // Lists the value parameter types. #define GMOCK_INTERNAL_LIST_TYPE_AND_0_VALUE_PARAMS() @@ -1330,6 +1454,10 @@ DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6, #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 +#define GMOCK_INTERNAL_LIST_TYPE_AND_11_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \ + p6, p7, p8, p9, p10) , p0##_type, p1##_type, p2##_type, p3##_type, \ + p4##_type, p5##_type, p6##_type, p7##_type, p8##_type, p9##_type, \ + p10##_type // Declares the value parameters. #define GMOCK_INTERNAL_DECL_AND_0_VALUE_PARAMS() @@ -1358,6 +1486,10 @@ DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6, 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 +#define GMOCK_INTERNAL_DECL_AND_11_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \ + p7, p8, p9, p10) 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, p10##_type p10 // The suffix of the class template implementing the action template. #define GMOCK_INTERNAL_COUNT_AND_0_VALUE_PARAMS() @@ -1374,6 +1506,8 @@ DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6, p7, p8) P9 #define GMOCK_INTERNAL_COUNT_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \ p7, p8, p9) P10 +#define GMOCK_INTERNAL_COUNT_AND_11_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \ + p7, p8, p9, p10) P11 // The name of the class template implementing the action template. #define GMOCK_ACTION_CLASS_(name, value_params)\ @@ -1401,11 +1535,11 @@ DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6, template \ + typename arg9_type, typename arg10_type>\ return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \ arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \ arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \ - arg9_type arg9) const;\ + arg9_type arg9, arg10_type arg10) const;\ GMOCK_INTERNAL_DEFN_##value_params\ private:\ GTEST_DISALLOW_ASSIGN_(gmock_Impl);\ @@ -1435,7 +1569,7 @@ DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6, template \ + typename arg9_type, typename arg10_type>\ typename ::testing::internal::Function::Result\ GMOCK_ACTION_CLASS_(name, value_params)<\ GMOCK_INTERNAL_LIST_##template_params\ @@ -1462,11 +1596,11 @@ DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6, template \ + typename arg9_type, typename arg10_type>\ return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \ arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \ arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \ - arg9_type arg9) const;\ + arg9_type arg9, arg10_type arg10) const;\ private:\ GTEST_DISALLOW_ASSIGN_(gmock_Impl);\ };\ @@ -1483,7 +1617,7 @@ DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6, template \ + typename arg9_type, typename arg10_type>\ typename ::testing::internal::Function::Result\ name##Action::gmock_Impl::gmock_PerformImpl(\ GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const @@ -1508,11 +1642,11 @@ DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6, template \ + typename arg9_type, typename arg10_type>\ return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \ arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \ arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \ - arg9_type arg9) const;\ + arg9_type arg9, arg10_type arg10) const;\ p0##_type p0;\ private:\ GTEST_DISALLOW_ASSIGN_(gmock_Impl);\ @@ -1533,7 +1667,7 @@ DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6, template \ + typename arg9_type, typename arg10_type>\ typename ::testing::internal::Function::Result\ name##ActionP::gmock_Impl::gmock_PerformImpl(\ GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const @@ -1560,11 +1694,11 @@ DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6, template \ + typename arg9_type, typename arg10_type>\ return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \ arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \ arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \ - arg9_type arg9) const;\ + arg9_type arg9, arg10_type arg10) const;\ p0##_type p0;\ p1##_type p1;\ private:\ @@ -1588,7 +1722,7 @@ DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6, template \ + typename arg9_type, typename arg10_type>\ typename ::testing::internal::Function::Result\ name##ActionP2::gmock_Impl::gmock_PerformImpl(\ GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const @@ -1615,11 +1749,11 @@ DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6, template \ + typename arg9_type, typename arg10_type>\ return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \ arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \ arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \ - arg9_type arg9) const;\ + arg9_type arg9, arg10_type arg10) const;\ p0##_type p0;\ p1##_type p1;\ p2##_type p2;\ @@ -1645,7 +1779,7 @@ DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6, template \ + typename arg9_type, typename arg10_type>\ typename ::testing::internal::Function::Result\ name##ActionP3::gmock_Impl::gmock_PerformImpl(\ @@ -1676,11 +1810,11 @@ DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6, template \ + typename arg9_type, typename arg10_type>\ return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \ arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \ arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \ - arg9_type arg9) const;\ + arg9_type arg9, arg10_type arg10) const;\ p0##_type p0;\ p1##_type p1;\ p2##_type p2;\ @@ -1712,7 +1846,7 @@ DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6, template \ + typename arg9_type, typename arg10_type>\ typename ::testing::internal::Function::Result\ name##ActionP4::gmock_Impl::gmock_PerformImpl(\ @@ -1744,11 +1878,11 @@ DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6, template \ + typename arg9_type, typename arg10_type>\ return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \ arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \ arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \ - arg9_type arg9) const;\ + arg9_type arg9, arg10_type arg10) const;\ p0##_type p0;\ p1##_type p1;\ p2##_type p2;\ @@ -1782,7 +1916,7 @@ DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6, template \ + typename arg9_type, typename arg10_type>\ typename ::testing::internal::Function::Result\ name##ActionP5::gmock_Impl::gmock_PerformImpl(\ @@ -1815,11 +1949,11 @@ DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6, template \ + typename arg9_type, typename arg10_type>\ return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \ arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \ arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \ - arg9_type arg9) const;\ + arg9_type arg9, arg10_type arg10) const;\ p0##_type p0;\ p1##_type p1;\ p2##_type p2;\ @@ -1855,7 +1989,7 @@ DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6, template \ + typename arg9_type, typename arg10_type>\ typename ::testing::internal::Function::Result\ name##ActionP6::gmock_Impl::gmock_PerformImpl(\ @@ -1890,11 +2024,11 @@ DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6, template \ + typename arg9_type, typename arg10_type>\ return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \ arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \ arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \ - arg9_type arg9) const;\ + arg9_type arg9, arg10_type arg10) const;\ p0##_type p0;\ p1##_type p1;\ p2##_type p2;\ @@ -1936,7 +2070,7 @@ DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6, template \ + typename arg9_type, typename arg10_type>\ typename ::testing::internal::Function::Result\ name##ActionP7::gmock_Impl::gmock_PerformImpl(\ @@ -1973,11 +2107,11 @@ DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6, template \ + typename arg9_type, typename arg10_type>\ return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \ arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \ arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \ - arg9_type arg9) const;\ + arg9_type arg9, arg10_type arg10) const;\ p0##_type p0;\ p1##_type p1;\ p2##_type p2;\ @@ -2022,7 +2156,7 @@ DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6, template \ + typename arg9_type, typename arg10_type>\ typename ::testing::internal::Function::Result\ name##ActionP8\ + typename arg9_type, typename arg10_type>\ return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \ arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \ arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \ - arg9_type arg9) const;\ + arg9_type arg9, arg10_type arg10) const;\ p0##_type p0;\ p1##_type p1;\ p2##_type p2;\ @@ -2113,7 +2247,7 @@ DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6, template \ + typename arg9_type, typename arg10_type>\ typename ::testing::internal::Function::Result\ name##ActionP9\ + typename arg9_type, typename arg10_type>\ return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \ arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \ arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \ - arg9_type arg9) const;\ + arg9_type arg9, arg10_type arg10) const;\ p0##_type p0;\ p1##_type p1;\ p2##_type p2;\ @@ -2209,13 +2343,113 @@ DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6, template \ + typename arg9_type, typename arg10_type>\ typename ::testing::internal::Function::Result\ name##ActionP10::gmock_Impl::gmock_PerformImpl(\ GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const +#define ACTION_P11(name, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10)\ + template \ + class name##ActionP11 {\ + public:\ + name##ActionP11(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, \ + p10##_type gmock_p10) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \ + p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), p7(gmock_p7), \ + p8(gmock_p8), p9(gmock_p9), p10(gmock_p10) {}\ + template \ + class gmock_Impl : public ::testing::ActionInterface {\ + public:\ + typedef F function_type;\ + typedef typename ::testing::internal::Function::Result return_type;\ + typedef typename ::testing::internal::Function::ArgumentTuple\ + args_type;\ + gmock_Impl(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, p10##_type gmock_p10) : p0(gmock_p0), \ + p1(gmock_p1), p2(gmock_p2), p3(gmock_p3), p4(gmock_p4), \ + p5(gmock_p5), p6(gmock_p6), p7(gmock_p7), p8(gmock_p8), \ + p9(gmock_p9), p10(gmock_p10) {}\ + virtual return_type Perform(const args_type& args) {\ + return ::testing::internal::ActionHelper::\ + Perform(this, args);\ + }\ + template \ + return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \ + arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \ + arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \ + arg9_type arg9, arg10_type arg10) const;\ + 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;\ + p10##_type p10;\ + private:\ + GTEST_DISALLOW_ASSIGN_(gmock_Impl);\ + };\ + template operator ::testing::Action() const {\ + return ::testing::Action(new gmock_Impl(p0, p1, p2, p3, p4, p5, \ + p6, p7, p8, p9, p10));\ + }\ + 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;\ + p10##_type p10;\ + private:\ + GTEST_DISALLOW_ASSIGN_(name##ActionP11);\ + };\ + template \ + inline name##ActionP11 name(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, p10##_type p10) {\ + return name##ActionP11(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10);\ + }\ + template \ + template \ + template \ + typename ::testing::internal::Function::Result\ + name##ActionP11::gmock_Impl::gmock_PerformImpl(\ + GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const + namespace testing { // The ACTION*() macros trigger warning C4100 (unreferenced formal @@ -2335,6 +2569,14 @@ ACTION_TEMPLATE(InvokeArgument, ::std::tr1::get(args), p0, p1, p2, p3, p4, p5, p6, p7, p8, p9); } +ACTION_TEMPLATE(InvokeArgument, + HAS_1_TEMPLATE_PARAMS(int, k), + AND_11_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, + p10)) { + return internal::CallableHelper::Call( + ::std::tr1::get(args), p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10); +} + // Various overloads for ReturnNew(). // // The ReturnNew(a1, a2, ..., a_k) action returns a pointer to a new @@ -2406,6 +2648,13 @@ ACTION_TEMPLATE(ReturnNew, return new T(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9); } +ACTION_TEMPLATE(ReturnNew, + HAS_1_TEMPLATE_PARAMS(typename, T), + AND_11_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, + p10)) { + return new T(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10); +} + #ifdef _MSC_VER # pragma warning(pop) #endif diff --git a/libwvdrmengine/test/gmock/include/gmock/gmock-generated-actions.h.pump b/libwvdrmengine/test/gmock/include/gmock/gmock-generated-actions.h.pump index 8e2b5735..c55321a3 100644 --- a/libwvdrmengine/test/gmock/include/gmock/gmock-generated-actions.h.pump +++ b/libwvdrmengine/test/gmock/include/gmock/gmock-generated-actions.h.pump @@ -2,7 +2,7 @@ $$ -*- mode: c++; -*- $$ This is a Pump source file. Please use Pump to convert it to $$ gmock-generated-actions.h. $$ -$var n = 10 $$ The maximum arity we support. +$var n = 11 $$ The maximum arity we support. $$}} This meta comment fixes auto-indentation in editors. // Copyright 2007, Google Inc. // All rights reserved. @@ -659,7 +659,7 @@ $for k [[, arg$k[[]]_type arg$k]]) const;\ template \ + typename arg9_type, typename arg10_type>\ typename ::testing::internal::Function::Result\ GMOCK_ACTION_CLASS_(name, value_params)<\ GMOCK_INTERNAL_LIST_##template_params\ diff --git a/libwvdrmengine/test/gmock/include/gmock/gmock-generated-function-mockers.h b/libwvdrmengine/test/gmock/include/gmock/gmock-generated-function-mockers.h index 577fd9e9..260d4728 100644 --- a/libwvdrmengine/test/gmock/include/gmock/gmock-generated-function-mockers.h +++ b/libwvdrmengine/test/gmock/include/gmock/gmock-generated-function-mockers.h @@ -317,6 +317,37 @@ class FunctionMocker : public } }; +template +class FunctionMocker : public + internal::FunctionMockerBase { + public: + typedef R F(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11); + typedef typename internal::Function::ArgumentTuple ArgumentTuple; + + MockSpec& With(const Matcher& m1, const Matcher& m2, + const Matcher& m3, const Matcher& m4, const Matcher& m5, + const Matcher& m6, const Matcher& m7, const Matcher& m8, + const Matcher& m9, const Matcher& m10, + const Matcher& m11) { + this->current_spec().SetMatchers(::std::tr1::make_tuple(m1, m2, m3, m4, m5, + m6, m7, m8, m9, m10, m11)); + return this->current_spec(); + } + + R Invoke(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9, + A10 a10, A11 a11) { + // Even though gcc and MSVC don't enforce it, 'this->' is required + // by the C++ standard [14.6.4] here, as the base class type is + // dependent on the template argument (and thus shouldn't be + // looked into when resolving InvokeWith). + return this->InvokeWith(ArgumentTuple(a1, a2, a3, a4, a5, a6, a7, a8, a9, + a10, a11)); + } +}; + } // namespace internal // The style guide prohibits "using" statements in a namespace scope @@ -669,6 +700,50 @@ using internal::FunctionMocker; mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(10, constness, \ Method) +// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!! +#define GMOCK_METHOD11_(tn, constness, ct, Method, ...) \ + GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \ + GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, \ + GMOCK_ARG_(tn, 2, __VA_ARGS__) gmock_a2, \ + GMOCK_ARG_(tn, 3, __VA_ARGS__) gmock_a3, \ + GMOCK_ARG_(tn, 4, __VA_ARGS__) gmock_a4, \ + GMOCK_ARG_(tn, 5, __VA_ARGS__) gmock_a5, \ + GMOCK_ARG_(tn, 6, __VA_ARGS__) gmock_a6, \ + GMOCK_ARG_(tn, 7, __VA_ARGS__) gmock_a7, \ + GMOCK_ARG_(tn, 8, __VA_ARGS__) gmock_a8, \ + GMOCK_ARG_(tn, 9, __VA_ARGS__) gmock_a9, \ + GMOCK_ARG_(tn, 10, __VA_ARGS__) gmock_a10, \ + GMOCK_ARG_(tn, 11, __VA_ARGS__) gmock_a11) constness { \ + GTEST_COMPILE_ASSERT_((::std::tr1::tuple_size< \ + tn ::testing::internal::Function<__VA_ARGS__>::ArgumentTuple>::value \ + == 11), \ + this_method_does_not_take_11_arguments); \ + GMOCK_MOCKER_(11, constness, Method).SetOwnerAndName(this, #Method); \ + return GMOCK_MOCKER_(11, constness, Method).Invoke(gmock_a1, gmock_a2, \ + gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7, gmock_a8, gmock_a9, \ + gmock_a10, gmock_a11); \ + } \ + ::testing::MockSpec<__VA_ARGS__>& \ + gmock_##Method(GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \ + GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2, \ + GMOCK_MATCHER_(tn, 3, __VA_ARGS__) gmock_a3, \ + GMOCK_MATCHER_(tn, 4, __VA_ARGS__) gmock_a4, \ + GMOCK_MATCHER_(tn, 5, __VA_ARGS__) gmock_a5, \ + GMOCK_MATCHER_(tn, 6, __VA_ARGS__) gmock_a6, \ + GMOCK_MATCHER_(tn, 7, __VA_ARGS__) gmock_a7, \ + GMOCK_MATCHER_(tn, 8, __VA_ARGS__) gmock_a8, \ + GMOCK_MATCHER_(tn, 9, __VA_ARGS__) gmock_a9, \ + GMOCK_MATCHER_(tn, 10, __VA_ARGS__) gmock_a10, \ + GMOCK_MATCHER_(tn, 11, \ + __VA_ARGS__) gmock_a11) constness { \ + GMOCK_MOCKER_(11, constness, Method).RegisterOwner(this); \ + return GMOCK_MOCKER_(11, constness, Method).With(gmock_a1, gmock_a2, \ + gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7, gmock_a8, gmock_a9, \ + gmock_a10, gmock_a11); \ + } \ + mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(11, constness, \ + Method) + #define MOCK_METHOD0(m, ...) GMOCK_METHOD0_(, , , m, __VA_ARGS__) #define MOCK_METHOD1(m, ...) GMOCK_METHOD1_(, , , m, __VA_ARGS__) #define MOCK_METHOD2(m, ...) GMOCK_METHOD2_(, , , m, __VA_ARGS__) @@ -680,6 +755,7 @@ using internal::FunctionMocker; #define MOCK_METHOD8(m, ...) GMOCK_METHOD8_(, , , m, __VA_ARGS__) #define MOCK_METHOD9(m, ...) GMOCK_METHOD9_(, , , m, __VA_ARGS__) #define MOCK_METHOD10(m, ...) GMOCK_METHOD10_(, , , m, __VA_ARGS__) +#define MOCK_METHOD11(m, ...) GMOCK_METHOD11_(, , , m, __VA_ARGS__) #define MOCK_CONST_METHOD0(m, ...) GMOCK_METHOD0_(, const, , m, __VA_ARGS__) #define MOCK_CONST_METHOD1(m, ...) GMOCK_METHOD1_(, const, , m, __VA_ARGS__) @@ -692,6 +768,7 @@ using internal::FunctionMocker; #define MOCK_CONST_METHOD8(m, ...) GMOCK_METHOD8_(, const, , m, __VA_ARGS__) #define MOCK_CONST_METHOD9(m, ...) GMOCK_METHOD9_(, const, , m, __VA_ARGS__) #define MOCK_CONST_METHOD10(m, ...) GMOCK_METHOD10_(, const, , m, __VA_ARGS__) +#define MOCK_CONST_METHOD11(m, ...) GMOCK_METHOD11_(, const, , m, __VA_ARGS__) #define MOCK_METHOD0_T(m, ...) GMOCK_METHOD0_(typename, , , m, __VA_ARGS__) #define MOCK_METHOD1_T(m, ...) GMOCK_METHOD1_(typename, , , m, __VA_ARGS__) @@ -704,6 +781,7 @@ using internal::FunctionMocker; #define MOCK_METHOD8_T(m, ...) GMOCK_METHOD8_(typename, , , m, __VA_ARGS__) #define MOCK_METHOD9_T(m, ...) GMOCK_METHOD9_(typename, , , m, __VA_ARGS__) #define MOCK_METHOD10_T(m, ...) GMOCK_METHOD10_(typename, , , m, __VA_ARGS__) +#define MOCK_METHOD11_T(m, ...) GMOCK_METHOD11_(typename, , , m, __VA_ARGS__) #define MOCK_CONST_METHOD0_T(m, ...) \ GMOCK_METHOD0_(typename, const, , m, __VA_ARGS__) @@ -727,6 +805,8 @@ using internal::FunctionMocker; GMOCK_METHOD9_(typename, const, , m, __VA_ARGS__) #define MOCK_CONST_METHOD10_T(m, ...) \ GMOCK_METHOD10_(typename, const, , m, __VA_ARGS__) +#define MOCK_CONST_METHOD11_T(m, ...) \ + GMOCK_METHOD11_(typename, const, , m, __VA_ARGS__) #define MOCK_METHOD0_WITH_CALLTYPE(ct, m, ...) \ GMOCK_METHOD0_(, , ct, m, __VA_ARGS__) @@ -750,6 +830,8 @@ using internal::FunctionMocker; GMOCK_METHOD9_(, , ct, m, __VA_ARGS__) #define MOCK_METHOD10_WITH_CALLTYPE(ct, m, ...) \ GMOCK_METHOD10_(, , ct, m, __VA_ARGS__) +#define MOCK_METHOD11_WITH_CALLTYPE(ct, m, ...) \ + GMOCK_METHOD11_(, , ct, m, __VA_ARGS__) #define MOCK_CONST_METHOD0_WITH_CALLTYPE(ct, m, ...) \ GMOCK_METHOD0_(, const, ct, m, __VA_ARGS__) @@ -773,6 +855,8 @@ using internal::FunctionMocker; GMOCK_METHOD9_(, const, ct, m, __VA_ARGS__) #define MOCK_CONST_METHOD10_WITH_CALLTYPE(ct, m, ...) \ GMOCK_METHOD10_(, const, ct, m, __VA_ARGS__) +#define MOCK_CONST_METHOD11_WITH_CALLTYPE(ct, m, ...) \ + GMOCK_METHOD11_(, const, ct, m, __VA_ARGS__) #define MOCK_METHOD0_T_WITH_CALLTYPE(ct, m, ...) \ GMOCK_METHOD0_(typename, , ct, m, __VA_ARGS__) @@ -796,6 +880,8 @@ using internal::FunctionMocker; GMOCK_METHOD9_(typename, , ct, m, __VA_ARGS__) #define MOCK_METHOD10_T_WITH_CALLTYPE(ct, m, ...) \ GMOCK_METHOD10_(typename, , ct, m, __VA_ARGS__) +#define MOCK_METHOD11_T_WITH_CALLTYPE(ct, m, ...) \ + GMOCK_METHOD11_(typename, , ct, m, __VA_ARGS__) #define MOCK_CONST_METHOD0_T_WITH_CALLTYPE(ct, m, ...) \ GMOCK_METHOD0_(typename, const, ct, m, __VA_ARGS__) @@ -819,6 +905,8 @@ using internal::FunctionMocker; GMOCK_METHOD9_(typename, const, ct, m, __VA_ARGS__) #define MOCK_CONST_METHOD10_T_WITH_CALLTYPE(ct, m, ...) \ GMOCK_METHOD10_(typename, const, ct, m, __VA_ARGS__) +#define MOCK_CONST_METHOD11_T_WITH_CALLTYPE(ct, m, ...) \ + GMOCK_METHOD11_(typename, const, ct, m, __VA_ARGS__) // A MockFunction class has one mock method whose type is F. It is // useful when you just want your test code to emit some messages and @@ -986,6 +1074,19 @@ class MockFunction { GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFunction); }; +template +class MockFunction { + public: + MockFunction() {} + + MOCK_METHOD11_T(Call, R(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10)); + + private: + GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFunction); +}; + } // namespace testing #endif // GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_FUNCTION_MOCKERS_H_ diff --git a/libwvdrmengine/test/gmock/include/gmock/gmock-generated-function-mockers.h.pump b/libwvdrmengine/test/gmock/include/gmock/gmock-generated-function-mockers.h.pump index f050caf1..d90cc963 100644 --- a/libwvdrmengine/test/gmock/include/gmock/gmock-generated-function-mockers.h.pump +++ b/libwvdrmengine/test/gmock/include/gmock/gmock-generated-function-mockers.h.pump @@ -2,7 +2,7 @@ $$ -*- mode: c++; -*- $$ This is a Pump source file. Please use Pump to convert it to $$ gmock-generated-function-mockers.h. $$ -$var n = 10 $$ The maximum arity we support. +$var n = 11 $$ The maximum arity we support. // Copyright 2007, Google Inc. // All rights reserved. // diff --git a/libwvdrmengine/test/gmock/include/gmock/gmock-generated-matchers.h b/libwvdrmengine/test/gmock/include/gmock/gmock-generated-matchers.h index b4c85715..9f0a4707 100644 --- a/libwvdrmengine/test/gmock/include/gmock/gmock-generated-matchers.h +++ b/libwvdrmengine/test/gmock/include/gmock/gmock-generated-matchers.h @@ -64,12 +64,12 @@ namespace internal { template + int k9 = -1, int k10 = -1> class TupleFields; -// This generic version is used when there are 10 selectors. +// This generic version is used when there are 11 selectors. template + int k7, int k8, int k9, int k10> class TupleFields { public: typedef ::std::tr1::tuple type; + GMOCK_FIELD_TYPE_(Tuple, k9), GMOCK_FIELD_TYPE_(Tuple, k10)> type; static type GetSelectedFields(const Tuple& t) { using ::std::tr1::get; return type(get(t), get(t), get(t), get(t), get(t), - get(t), get(t), get(t), get(t), get(t)); + get(t), get(t), get(t), get(t), get(t), + get(t)); } }; -// The following specialization is used for 0 ~ 9 selectors. +// The following specialization is used for 0 ~ 10 selectors. template -class TupleFields { +class TupleFields { public: typedef ::std::tr1::tuple<> type; static type GetSelectedFields(const Tuple& /* t */) { @@ -98,7 +99,7 @@ class TupleFields { }; template -class TupleFields { +class TupleFields { public: typedef ::std::tr1::tuple type; static type GetSelectedFields(const Tuple& t) { @@ -108,7 +109,7 @@ class TupleFields { }; template -class TupleFields { +class TupleFields { public: typedef ::std::tr1::tuple type; @@ -119,7 +120,7 @@ class TupleFields { }; template -class TupleFields { +class TupleFields { public: typedef ::std::tr1::tuple type; @@ -130,7 +131,7 @@ class TupleFields { }; template -class TupleFields { +class TupleFields { public: typedef ::std::tr1::tuple { }; template -class TupleFields { +class TupleFields { public: typedef ::std::tr1::tuple { }; template -class TupleFields { +class TupleFields { public: typedef ::std::tr1::tuple { }; template -class TupleFields { +class TupleFields { public: typedef ::std::tr1::tuple { template -class TupleFields { +class TupleFields { public: typedef ::std::tr1::tuple { template -class TupleFields { +class TupleFields { public: typedef ::std::tr1::tuple { } }; +template +class TupleFields { + public: + typedef ::std::tr1::tuple type; + static type GetSelectedFields(const Tuple& t) { + using ::std::tr1::get; + return type(get(t), get(t), get(t), get(t), get(t), + get(t), get(t), get(t), get(t), get(t)); + } +}; + #undef GMOCK_FIELD_TYPE_ // Implements the Args() matcher. template + int k9 = -1, int k10 = -1> class ArgsMatcherImpl : public MatcherInterface { public: // ArgsTuple may have top-level const or reference modifiers. typedef GTEST_REMOVE_REFERENCE_AND_CONST_(ArgsTuple) RawArgsTuple; typedef typename internal::TupleFields::type SelectedArgs; + k6, k7, k8, k9, k10>::type SelectedArgs; typedef Matcher MonomorphicInnerMatcher; template @@ -261,15 +279,15 @@ class ArgsMatcherImpl : public MatcherInterface { private: static SelectedArgs GetSelectedArgs(ArgsTuple args) { - return TupleFields::GetSelectedFields(args); + return TupleFields::GetSelectedFields(args); } // Prints the indices of the selected fields. static void PrintIndices(::std::ostream* os) { *os << "whose fields ("; - const int indices[10] = { k0, k1, k2, k3, k4, k5, k6, k7, k8, k9 }; - for (int i = 0; i < 10; i++) { + const int indices[11] = { k0, k1, k2, k3, k4, k5, k6, k7, k8, k9, k10 }; + for (int i = 0; i < 11; i++) { if (indices[i] < 0) break; @@ -288,7 +306,7 @@ class ArgsMatcherImpl : public MatcherInterface { template + int k8 = -1, int k9 = -1, int k10 = -1> class ArgsMatcher { public: explicit ArgsMatcher(const InnerMatcher& inner_matcher) @@ -297,7 +315,7 @@ class ArgsMatcher { template operator Matcher() const { return MakeMatcher(new ArgsMatcherImpl(inner_matcher_)); + k6, k7, k8, k9, k10>(inner_matcher_)); } private: @@ -394,6 +412,16 @@ struct AllOfResult10 { > type; }; +template +struct AllOfResult11 { + typedef BothOfMatcher< + typename AllOfResult5::type, + typename AllOfResult6::type + > type; +}; + // A set of metafunctions for computing the result type of AnyOf. // AnyOf(m1, ..., mN) returns // AnyOfResultN::type. @@ -482,6 +510,16 @@ struct AnyOfResult10 { > type; }; +template +struct AnyOfResult11 { + typedef EitherOfMatcher< + typename AnyOfResult5::type, + typename AnyOfResult6::type + > type; +}; + } // namespace internal // Args(a_matcher) matches a tuple if the selected @@ -562,11 +600,20 @@ Args(const InnerMatcher& matcher) { k9, k10>(matcher); } +template +inline internal::ArgsMatcher +Args(const InnerMatcher& matcher) { + return internal::ArgsMatcher(matcher); +} + // ElementsAre(e_1, e_2, ... e_n) matches an STL-style container with // n elements, where the i-th element in the container must // match the i-th argument in the list. Each argument of // ElementsAre() can be either a value or a matcher. We support up to -// 10 arguments. +// 11 arguments. // // The use of DecayArray in the implementation allows ElementsAre() // to accept string literals, whose type is const char[N], but we @@ -788,8 +835,43 @@ ElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4, e8, e9, e10)); } +template +inline internal::ElementsAreMatcher< + std::tr1::tuple< + typename internal::DecayArray::type, + typename internal::DecayArray::type, + typename internal::DecayArray::type, + typename internal::DecayArray::type, + typename internal::DecayArray::type, + typename internal::DecayArray::type, + typename internal::DecayArray::type, + typename internal::DecayArray::type, + typename internal::DecayArray::type, + typename internal::DecayArray::type, + typename internal::DecayArray::type> > +ElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4, + const T5& e5, const T6& e6, const T7& e7, const T8& e8, const T9& e9, + const T10& e10, const T11& e11) { + typedef std::tr1::tuple< + typename internal::DecayArray::type, + typename internal::DecayArray::type, + typename internal::DecayArray::type, + typename internal::DecayArray::type, + typename internal::DecayArray::type, + typename internal::DecayArray::type, + typename internal::DecayArray::type, + typename internal::DecayArray::type, + typename internal::DecayArray::type, + typename internal::DecayArray::type, + typename internal::DecayArray::type> Args; + return internal::ElementsAreMatcher(Args(e1, e2, e3, e4, e5, e6, e7, + e8, e9, e10, e11)); +} + // UnorderedElementsAre(e_1, e_2, ..., e_n) is an ElementsAre extension -// that matches n elements in any order. We support up to n=10 arguments. +// that matches n elements in any order. We support up to n=11 arguments. inline internal::UnorderedElementsAreMatcher< std::tr1::tuple<> > @@ -1005,6 +1087,41 @@ UnorderedElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4, e6, e7, e8, e9, e10)); } +template +inline internal::UnorderedElementsAreMatcher< + std::tr1::tuple< + typename internal::DecayArray::type, + typename internal::DecayArray::type, + typename internal::DecayArray::type, + typename internal::DecayArray::type, + typename internal::DecayArray::type, + typename internal::DecayArray::type, + typename internal::DecayArray::type, + typename internal::DecayArray::type, + typename internal::DecayArray::type, + typename internal::DecayArray::type, + typename internal::DecayArray::type> > +UnorderedElementsAre(const T1& e1, const T2& e2, const T3& e3, const T4& e4, + const T5& e5, const T6& e6, const T7& e7, const T8& e8, const T9& e9, + const T10& e10, const T11& e11) { + typedef std::tr1::tuple< + typename internal::DecayArray::type, + typename internal::DecayArray::type, + typename internal::DecayArray::type, + typename internal::DecayArray::type, + typename internal::DecayArray::type, + typename internal::DecayArray::type, + typename internal::DecayArray::type, + typename internal::DecayArray::type, + typename internal::DecayArray::type, + typename internal::DecayArray::type, + typename internal::DecayArray::type> Args; + return internal::UnorderedElementsAreMatcher(Args(e1, e2, e3, e4, e5, + e6, e7, e8, e9, e10, e11)); +} + // AllOf(m1, m2, ..., mk) matches any value that matches all of the given // sub-matchers. AllOf is called fully qualified to prevent ADL from firing. @@ -1088,6 +1205,19 @@ AllOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) { ::testing::AllOf(m6, m7, m8, m9, m10)); } +template +inline typename internal::AllOfResult11::type +AllOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10, + M11 m11) { + return typename internal::AllOfResult11::type( + ::testing::AllOf(m1, m2, m3, m4, m5), + ::testing::AllOf(m6, m7, m8, m9, m10, m11)); +} + // AnyOf(m1, m2, ..., mk) matches any value that matches any of the given // sub-matchers. AnyOf is called fully qualified to prevent ADL from firing. @@ -1171,6 +1301,19 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) { ::testing::AnyOf(m6, m7, m8, m9, m10)); } +template +inline typename internal::AnyOfResult11::type +AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10, + M11 m11) { + return typename internal::AnyOfResult11::type( + ::testing::AnyOf(m1, m2, m3, m4, m5), + ::testing::AnyOf(m6, m7, m8, m9, m10, m11)); +} + } // namespace testing @@ -1263,7 +1406,7 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) { // body of MATCHER_P(HasAbsoluteValue, value) above, you can write // 'value_type' to refer to the type of 'value'. // -// We also provide MATCHER_P2, MATCHER_P3, ..., up to MATCHER_P10 to +// We also provide MATCHER_P2, MATCHER_P3, ..., up to MATCHER_P11 to // support multi-parameter matchers. // // Describing Parameterized Matchers @@ -2187,4 +2330,109 @@ AnyOf(M1 m1, M2 m2, M3 m3, M4 m4, M5 m5, M6 m6, M7 m7, M8 m8, M9 m9, M10 m10) { ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\ const +#define MATCHER_P11(name, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, \ + description)\ + template \ + class name##MatcherP11 {\ + public:\ + template \ + class gmock_Impl : public ::testing::MatcherInterface {\ + public:\ + gmock_Impl(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, p10##_type gmock_p10)\ + : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), p3(gmock_p3), \ + p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), p7(gmock_p7), \ + p8(gmock_p8), p9(gmock_p9), p10(gmock_p10) {}\ + virtual bool MatchAndExplain(\ + arg_type arg, ::testing::MatchResultListener* result_listener) const;\ + virtual void DescribeTo(::std::ostream* gmock_os) const {\ + *gmock_os << FormatDescription(false);\ + }\ + virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\ + *gmock_os << FormatDescription(true);\ + }\ + 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;\ + p10##_type p10;\ + private:\ + ::testing::internal::string FormatDescription(bool negation) const {\ + const ::testing::internal::string gmock_description = (description);\ + if (!gmock_description.empty())\ + return gmock_description;\ + return ::testing::internal::FormatMatcherDescription(\ + negation, #name, \ + ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\ + ::std::tr1::tuple(p0, p1, p2, p3, p4, p5, p6, p7, \ + p8, p9, p10)));\ + }\ + GTEST_DISALLOW_ASSIGN_(gmock_Impl);\ + };\ + template \ + operator ::testing::Matcher() const {\ + return ::testing::Matcher(\ + new gmock_Impl(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, \ + p10));\ + }\ + name##MatcherP11(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, \ + p10##_type gmock_p10) : p0(gmock_p0), p1(gmock_p1), p2(gmock_p2), \ + p3(gmock_p3), p4(gmock_p4), p5(gmock_p5), p6(gmock_p6), p7(gmock_p7), \ + p8(gmock_p8), p9(gmock_p9), p10(gmock_p10) {\ + }\ + 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;\ + p10##_type p10;\ + private:\ + GTEST_DISALLOW_ASSIGN_(name##MatcherP11);\ + };\ + template \ + inline name##MatcherP11 name(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, p10##_type p10) {\ + return name##MatcherP11(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10);\ + }\ + template \ + template \ + bool name##MatcherP11::gmock_Impl::MatchAndExplain(\ + arg_type arg, \ + ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\ + const + #endif // GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_MATCHERS_H_ diff --git a/libwvdrmengine/test/gmock/include/gmock/gmock-generated-matchers.h.pump b/libwvdrmengine/test/gmock/include/gmock/gmock-generated-matchers.h.pump index af02acbc..0c6b76f2 100644 --- a/libwvdrmengine/test/gmock/include/gmock/gmock-generated-matchers.h.pump +++ b/libwvdrmengine/test/gmock/include/gmock/gmock-generated-matchers.h.pump @@ -2,7 +2,7 @@ $$ -*- mode: c++; -*- $$ This is a Pump source file. Please use Pump to convert it to $$ gmock-generated-actions.h. $$ -$var n = 10 $$ The maximum arity we support. +$var n = 11 $$ The maximum arity we support. $$ }} This line fixes auto-indentation of the following code in Emacs. // Copyright 2008, Google Inc. // All rights reserved. diff --git a/libwvdrmengine/test/gmock/include/gmock/gmock-generated-nice-strict.h b/libwvdrmengine/test/gmock/include/gmock/gmock-generated-nice-strict.h index 4095f4d5..6ab61973 100644 --- a/libwvdrmengine/test/gmock/include/gmock/gmock-generated-nice-strict.h +++ b/libwvdrmengine/test/gmock/include/gmock/gmock-generated-nice-strict.h @@ -51,7 +51,7 @@ // NiceMock. // // NiceMock, NaggyMock, and StrictMock "inherit" the constructors of -// their respective base class, with up-to 10 arguments. Therefore +// their respective base class, with up-to 11 arguments. Therefore // you can write NiceMock(5, "a") to construct a nice mock // where MockFoo has a constructor that accepts (int, const char*), // for example. @@ -163,6 +163,17 @@ class NiceMock : public MockClass { internal::ImplicitCast_(this)); } + template + NiceMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4, + const A5& a5, const A6& a6, const A7& a7, const A8& a8, const A9& a9, + const A10& a10, const A11& a11) : MockClass(a1, a2, a3, a4, a5, a6, a7, + a8, a9, a10, a11) { + ::testing::Mock::AllowUninterestingCalls( + internal::ImplicitCast_(this)); + } + virtual ~NiceMock() { ::testing::Mock::UnregisterCallReaction( internal::ImplicitCast_(this)); @@ -259,6 +270,17 @@ class NaggyMock : public MockClass { internal::ImplicitCast_(this)); } + template + NaggyMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4, + const A5& a5, const A6& a6, const A7& a7, const A8& a8, const A9& a9, + const A10& a10, const A11& a11) : MockClass(a1, a2, a3, a4, a5, a6, a7, + a8, a9, a10, a11) { + ::testing::Mock::WarnUninterestingCalls( + internal::ImplicitCast_(this)); + } + virtual ~NaggyMock() { ::testing::Mock::UnregisterCallReaction( internal::ImplicitCast_(this)); @@ -355,6 +377,17 @@ class StrictMock : public MockClass { internal::ImplicitCast_(this)); } + template + StrictMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4, + const A5& a5, const A6& a6, const A7& a7, const A8& a8, const A9& a9, + const A10& a10, const A11& a11) : MockClass(a1, a2, a3, a4, a5, a6, a7, + a8, a9, a10, a11) { + ::testing::Mock::FailUninterestingCalls( + internal::ImplicitCast_(this)); + } + virtual ~StrictMock() { ::testing::Mock::UnregisterCallReaction( internal::ImplicitCast_(this)); diff --git a/libwvdrmengine/test/gmock/include/gmock/gmock-generated-nice-strict.h.pump b/libwvdrmengine/test/gmock/include/gmock/gmock-generated-nice-strict.h.pump index 3ee1ce7f..ca74e5b9 100644 --- a/libwvdrmengine/test/gmock/include/gmock/gmock-generated-nice-strict.h.pump +++ b/libwvdrmengine/test/gmock/include/gmock/gmock-generated-nice-strict.h.pump @@ -2,7 +2,7 @@ $$ -*- mode: c++; -*- $$ This is a Pump source file. Please use Pump to convert it to $$ gmock-generated-nice-strict.h. $$ -$var n = 10 $$ The maximum arity we support. +$var n = 11 $$ The maximum arity we support. // Copyright 2008, Google Inc. // All rights reserved. // diff --git a/libwvdrmengine/test/gmock/include/gmock/internal/gmock-generated-internal-utils.h b/libwvdrmengine/test/gmock/include/gmock/internal/gmock-generated-internal-utils.h index 02258451..d3026ead 100644 --- a/libwvdrmengine/test/gmock/include/gmock/internal/gmock-generated-internal-utils.h +++ b/libwvdrmengine/test/gmock/include/gmock/internal/gmock-generated-internal-utils.h @@ -137,6 +137,16 @@ struct MatcherTuple< ::std::tr1::tuple > type; }; +template +struct MatcherTuple< ::std::tr1::tuple > { + typedef ::std::tr1::tuple, Matcher, Matcher, Matcher, + Matcher, Matcher, Matcher, Matcher, Matcher, + Matcher, Matcher > type; +}; + // Template struct Function, where F must be a function type, contains // the following typedefs: // @@ -272,6 +282,20 @@ struct Function A9, A10); }; +template +struct Function + : Function { + typedef A11 Argument11; + typedef ::std::tr1::tuple ArgumentTuple; + typedef typename MatcherTuple::type ArgumentMatcherTuple; + typedef void MakeResultVoid(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11); + typedef IgnoredValue MakeResultIgnoredValue(A1, A2, A3, A4, A5, A6, A7, A8, + A9, A10, A11); +}; + } // namespace internal } // namespace testing diff --git a/libwvdrmengine/test/gmock/include/gmock/internal/gmock-generated-internal-utils.h.pump b/libwvdrmengine/test/gmock/include/gmock/internal/gmock-generated-internal-utils.h.pump index e7ecc8b8..45a62651 100644 --- a/libwvdrmengine/test/gmock/include/gmock/internal/gmock-generated-internal-utils.h.pump +++ b/libwvdrmengine/test/gmock/include/gmock/internal/gmock-generated-internal-utils.h.pump @@ -2,7 +2,7 @@ $$ -*- mode: c++; -*- $$ This is a Pump source file. Please use Pump to convert it to $$ gmock-generated-function-mockers.h. $$ -$var n = 10 $$ The maximum arity we support. +$var n = 11 $$ The maximum arity we support. // Copyright 2007, Google Inc. // All rights reserved. //