Skip to content
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

gmock_gen.py does not reproduce "const" for const return type #44

Closed
GoogleCodeExporter opened this issue Jun 25, 2015 · 4 comments
Closed

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
execute gmock_gen.py on a class containing the following type of method:

class AbstractObject{

public:

virtual const char* getObject() const = 0;
};

file MockBug.h containing a class with this type of method is attached.

What is the expected output? 

MOCK_CONST_METHOD0(getObject, const char*() );


What do you see instead?

MOCK_CONST_METHOD0(getObject, char*() );

file mock_test_output.txt is attached.

What version of the product are you using? On what operating system?

googlemock 1.1.0
python 2.6
windows xp


Used this googlemock cookbook example as a reference that const should be
included:

for method in the cookbook:  virtual const Bar& GetBar() const;
cookbook example:  MOCK_CONST_METHOD0(GetBar, const Bar&());


Original issue reported on code.google.com by marlena....@gmail.com on 28 Apr 2009 at 9:18

Attachments:

@GoogleCodeExporter
Copy link
Author

Original comment by zhanyong...@gmail.com on 1 May 2009 at 7:46

  • Changed state: Accepted
  • Added labels: OpSys-All

@GoogleCodeExporter
Copy link
Author

Original comment by zhanyong...@gmail.com on 1 May 2009 at 4:19

@GoogleCodeExporter
Copy link
Author

Thanks for the report.  I'll take a look.

Original comment by nnorw...@gmail.com on 1 May 2009 at 4:23

@GoogleCodeExporter
Copy link
Author

Committed revision 145.  You can use the upgraded script by downloading it 
here: 
http://googlemock.googlecode.com/svn/trunk/scripts/generator/cpp/gmock_class.py

Install that file over top of the existing gmock_class.py file and that should 
fix
this problem.  Let me know if you have more issues.

Thanks again for the bug report.

Original comment by nnorw...@gmail.com on 6 May 2009 at 5:04

  • Changed state: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant