-
Notifications
You must be signed in to change notification settings - Fork 10.6k
gmock_gen.py discards argument specifiers when they are defaulted #2470
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
|
@googlebot I signed it! |
|
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
|
@hermas55 The scripts in the /script directory are out of date and not well supported anymore . I would be glad to merge this PR if you explain your usage. |
|
@hermas55 ping? |
|
Hello @gennadiycivil , Sure. There is as bug in the gmock_gen.py script. It works fine as long as the class in input doesn't have methods with default parameters. When there are default parameters, the Example of Input class : class Foo {
public:
virtual void Bar( const int a = 42 ) ;
};Output before the fix (const and parameter name discarded) : class MockFoo : public Foo {
public:
MOCK_METHOD1(Bar, void(int));
};Output after the fix : class MockFoo : public Foo {
public:
MOCK_METHOD1(Bar, void(const int a));
};The PR contains 3 commits :
Please let me know if you have any concerns. Kind regards, |
|
@hermas55 Headsup, we are going to include the files under /scrips with the sync process that syncs the files internally and on GitHub. ( We will also include a disclaimer that these files are unsupported. ) |
|
@hermas55 please resolve conflicts |
65032e2 to
c7eaa00
Compare
|
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. ℹ️ Googlers: Go here for more info. |
c7eaa00 to
44dd80d
Compare
|
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
44dd80d to
0867d0b
Compare
|
conflicts resolved |
|
Thank you, we have started internal review. Please don't push any more changes into this PR as they might be overwritten. |
Merge 65032e28cba171c000accc85ffaf6f1e62921b86 into 8c91ece Closes #2470 COPYBARA_INTEGRATE_REVIEW=google/googletest#2470 from hermas55:bugfix/default_const_param 65032e28cba171c000accc85ffaf6f1e62921b86 PiperOrigin-RevId: 277118535
Example :
Expected output :
Actual output (const and parameter name discarded) :