flush_script_test.cpp 774 B

1234567891011121314151617181920
  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 flushAfter = 4;
  13. const size_t testCaseNum = 3 * flushAfter;
  14. std::string testName(flushThreshold / flushAfter, 'T');
  15. for (size_t i = 1; i <= testCaseNum; ++i)
  16. std::cout << " t" << i << testName.c_str() << "\n";
  17. }
  18. return 0;
  19. }