diff options
Diffstat (limited to 'Tools/TestWebKitAPI/TestsController.cpp')
| -rw-r--r-- | Tools/TestWebKitAPI/TestsController.cpp | 33 |
1 files changed, 2 insertions, 31 deletions
diff --git a/Tools/TestWebKitAPI/TestsController.cpp b/Tools/TestWebKitAPI/TestsController.cpp index 913305d7b..29dcc714e 100644 --- a/Tools/TestWebKitAPI/TestsController.cpp +++ b/Tools/TestWebKitAPI/TestsController.cpp @@ -30,33 +30,9 @@ namespace TestWebKitAPI { -class Printer : public ::testing::EmptyTestEventListener { - virtual void OnTestPartResult(const ::testing::TestPartResult& test_part_result) - { - if (!test_part_result.failed()) - return; - - std::stringstream stream; - stream << "\n" << test_part_result.file_name() << ":" << test_part_result.line_number() << "\n" << test_part_result.summary() << "\n\n"; - failures += stream.str(); - } - - virtual void OnTestEnd(const ::testing::TestInfo& test_info) - { - if (test_info.result()->Passed()) - std::cout << "**PASS** " << test_info.test_case_name() << "." << test_info.name() << "\n"; - else - std::cout << "**FAIL** " << test_info.test_case_name() << "." << test_info.name() << "\n" << failures; - - failures = std::string(); - } - - std::string failures; -}; - -TestsController& TestsController::singleton() +TestsController& TestsController::shared() { - static NeverDestroyed<TestsController> shared; + static TestsController& shared = *new TestsController; return shared; } @@ -72,11 +48,6 @@ TestsController::TestsController() bool TestsController::run(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); - - ::testing::TestEventListeners& listeners = ::testing::UnitTest::GetInstance()->listeners(); - delete listeners.Release(listeners.default_result_printer()); - listeners.Append(new Printer); - return !RUN_ALL_TESTS(); } |
