I’m using Google Test to test my C++ project. Some cases, however, require access to argc and argv to load the required data.
In the main()
method, when
The command line arguments to your test executable are for the test framework, not for your tests. With them, you set stuff like --gtest_output
, --gtest_repeat
or --gtest_filter
. A test should first and foremost be reproducable, which it isn't if it is depending on someone using the "right" parameters.
What are you trying to achieve, anyway?