diff options
| author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2015-05-20 09:56:07 +0000 |
|---|---|---|
| committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2015-05-20 09:56:07 +0000 |
| commit | 41386e9cb918eed93b3f13648cbef387e371e451 (patch) | |
| tree | a97f9d7bd1d9d091833286085f72da9d83fd0606 /Tools/TestWebKitAPI/TestsController.cpp | |
| parent | e15dd966d523731101f70ccf768bba12435a0208 (diff) | |
| download | WebKitGtk-tarball-41386e9cb918eed93b3f13648cbef387e371e451.tar.gz | |
webkitgtk-2.4.9webkitgtk-2.4.9
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(); } |
