accord
Whole Tomato Software
United Kingdom
3287 Posts |
Posted - Jun 23 2015 : 6:21:27 PM
|
Hmmm. Interesting idea. I haven't used this framework myself, but luckily there is a page called Google C++ Mocking Framework for Dummies so I was able to get up to speed easily.
I think something like a snippet for each line of the generated methods could be used here.
For example you could use something like the below snippet to generate MOCK_METHOD2(GoTo, void(int x, int y));
MOCK_METHOD$ArgCount$($SymbolName$, $SymbolType$($MethodArgs$));
The sample line is came from here: https://code.google.com/p/googlemock/wiki/ForDummies#Writing_the_Mock_Class
And the snippet variable names based on this document: http://docs.wholetomato.com/default.asp?W262
As you said you would want to select which snippets to use, and we could provide googlemock as a sample.
I have opened a feature request for this idea:
case=90460
Later, we could even create more snippets for other frameworks to have a better out-of-box experience, if we see demand for it. |
Edited by - accord on Jun 23 2015 6:21:48 PM |
|
|