flush_script_test.cpp 728 B

12345678910111213141516171819
  1. #include <iostream>
  2. #include <string>
  3. int main(int argc, char** argv)
  4. {
  5. // Note: GoogleTest.cmake doesn't actually depend on Google Test as such;
  6. // it only requires that we produces 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. if (argc > 1 && std::string(argv[1]) == "--gtest_list_tests") {
  10. std::cout << "flush_script_test.\n";
  11. const size_t flushThreshold = 50000;
  12. const size_t testCaseNum = 4;
  13. std::string testName(flushThreshold / (testCaseNum - 1), 'T');
  14. for (size_t i = 0; i < testCaseNum; ++i)
  15. std::cout << " " << testName.c_str() << "\n";
  16. }
  17. return 0;
  18. }