chromeos-dbus-bindings: Handle mocks all the way up to eleven.

(cherry-pick of platform2 240e46d3b77a969611ec6855cbb2e95a4293a3b6)

gmock doesn't define MOCK_METHODn for n greater than 10 due to some
legacy compiler limitations in older Visual Studio versions. While
hanving methods with more than 10 arguments is rare and a bad idea in
general, we have some DBus methods that will generate wrappers with
more than 10 arguments, between DBus method arguments and the added
callbacks, and timeouts.

This patch avoids the problem by not generating an invalid MOCK_METHOD
entry for such methods and leaving the chance for the user of such
mock to subclass it and implement such method in a different way or
ignore the problem if the method in the mock was not needed at all. To
do this we provide a default implementation with a warning.

BUG=chromium:419827
TEST=Added unittests. Generated flimflam.ManagerProxy mocks that now compile.

Change-Id: I742217b1cdd8bfb4ee5a37bec51485e21cb654d9
Reviewed-on: https://chromium-review.googlesource.com/289835
Commit-Queue: Alex Deymo <deymo@chromium.org>
Trybot-Ready: Alex Deymo <deymo@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
3 files changed
tree: 7da702680650495a29d0e7696a1e8d0436b83771
  1. chromeos-dbus-bindings/
  2. Android.mk
  3. MODULE_LICENSE_BSD
  4. NOTICE