test_list_extra_args.cpp 861 B

12345678910111213141516171819202122
  1. #include <iostream>
  2. #include <string>
  3. int main(int argc, char** argv)
  4. {
  5. // Note: This test doesn't actually depend on Google Test as such;
  6. // it only requires that we produce output in the expected format when
  7. // invoked with --gtest_list_tests. Thus, we fake that here. This allows us
  8. // to test the module without actually needing Google Test.
  9. // Simple test of DISCOVERY_EXTRA_ARGS
  10. if (argc > 4 && std::string(argv[1]) == "--gtest_list_tests" &&
  11. std::string(argv[2]) == "how now" && std::string(argv[3]) == "" &&
  12. std::string(argv[4]) == "\"brown\" cow") {
  13. std::cout << "test_list_test/test.\n";
  14. std::cout << " case/0 # GetParam() = 'one'\n";
  15. std::cout << " case/1 # GetParam() = 'two'\n";
  16. std::cout << " case/2 # GetParam() = 'three'\n";
  17. std::cout << " case/3 # GetParam() = 'four'\n";
  18. }
  19. return 0;
  20. }