How to pass parameters to the gtest

Google Test only recognizes its own command-line options. Each time it finds one, it removes it from argv and updates argc accordingly, so after InitGoogleTest returns, anything left over in argv is available for you to process yourself. Use your favorite command-line-parsing technique, store the results in some global variable, and refer to it during your tests.

If a command-line options looks like a Google Test option but really isn’t, then the program will print its help message and exit without running any tests. Google Test options start with gtest_.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)