From 0f0be1b0bcfdb99116d9c87d4ad1e76153972d83 Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Sun, 3 Sep 2017 23:24:24 +0200 Subject: [PATCH] Bugfix: unit test timer now works correctly. --- src/unit_tests/unit_test_main.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/unit_tests/unit_test_main.cc b/src/unit_tests/unit_test_main.cc index d936c6930..108059b11 100644 --- a/src/unit_tests/unit_test_main.cc +++ b/src/unit_tests/unit_test_main.cc @@ -128,8 +128,6 @@ run_tests (const std::vector &selected_tests, bool editable, boo if (! (*t)->do_test (e != 0, slow)) { - timer.stop(); - ut::ctrl << ""; ut::ctrl << "name (), false) << " failed (continued mode - see previous messages)" << "\"/>"; @@ -142,6 +140,8 @@ run_tests (const std::vector &selected_tests, bool editable, boo ut::ctrl << ""; } + timer.stop(); + ut::noctrl << "Time: " << timer.sec_wall () << "s (wall) " << timer.sec_user () << "s (user) " << timer.sec_sys () << "s (sys)"; ut::ctrl << "";