mpherg/googletest

Can I use command line parameters to pass parameters to my test function

Closed this issue · 1 comments

IMPORTANT NOTE: PLEASE send issues or requests to
http://groups.google.com/group/googletestframework *instead of here*.
This issue tracker is NOT regularly monitored.

If you really need to create a new issue, please provide the information
asked for below.

What steps will reproduce the problem?
1.After build my test project and get a xxxxtest.
2.I want to pass 100 to my test function as ./xxxxtest 100.
3.Can it possible?

What is the expected output? What do you see instead?


What version of Google Test are you using? On what operating system?
gtest 1.6 ubuntu 11.10

Please provide any additional information below, such as a code snippet.

Original issue reported on code.google.com by Gino.Zha...@gmail.com on 29 Feb 2012 at 10:00

Yes, access it in the argv parameter in your main function after passing it to 
InitGoogleTest.

In the future, address questions to the mailing list. More people look at it 
and more often.

Original comment by vladlosev on 27 Apr 2012 at 6:10

  • Changed state: Invalid