You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to googlemock
I want to Mock a method which has more than 10 parameters. Can I do that without changing gmock source code ?
Regards -- Sukrit Singh Raghuvanshi(Mr.) Year 3 Computer Engineering (CEG)
National University of Singapore (NUS) HP: (+65) 81656631
Greg Miller
unread,
Nov 18, 2011, 9:45:55 AM11/18/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sukrit singh, googlemock
Hi, Sukrit.
The short answer is no. GMock's default arity maximum is 10. This is because some max has to be chosen, and often times a method taking more than 10 arguments should be refactored.
My advice would be to consider refactoring your function. If that's not an option, consider writing a wrapper that takes fewer arguments and mock that one. I would not recommend changing gmock's source code locally.