amitchhabra / googletest

Automatically exported from code.google.com/p/googletest
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

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

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago
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