summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorLucas CHOLLET <lucas.chollet@free.fr>2023-03-28 10:57:59 -0400
committerLinus Groh <mail@linusgroh.de>2023-04-03 20:58:49 +0100
commit66c12af45fbd19a2bff2098cf8909b75b8ab784a (patch)
tree13567fd7c617cf8a6c42edea7375804aa45e1b28 /Userland
parent2812ef246df09e763115645f9b2da37f6ce2b398 (diff)
downloadserenity-66c12af45fbd19a2bff2098cf8909b75b8ab784a.zip
LibTest: Don't output information on tests if none exist
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Libraries/LibTest/TestSuite.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/Userland/Libraries/LibTest/TestSuite.cpp b/Userland/Libraries/LibTest/TestSuite.cpp
index 4e69246320..f8c7f9a174 100644
--- a/Userland/Libraries/LibTest/TestSuite.cpp
+++ b/Userland/Libraries/LibTest/TestSuite.cpp
@@ -174,7 +174,9 @@ int TestSuite::run(Vector<NonnullRefPtr<TestCase>> const& tests)
m_testtime,
m_benchtime,
global_timer.elapsed_milliseconds() - (m_testtime + m_benchtime));
- dbgln("Out of {} tests, {} passed and {} failed.", test_count, test_count - test_failed_count, test_failed_count);
+
+ if (test_count != 0)
+ dbgln("Out of {} tests, {} passed and {} failed.", test_count, test_count - test_failed_count, test_failed_count);
return (int)test_failed_count;
}