From 5f4f86fc9a558e8d0bbf068e36ab7432914ae945 Mon Sep 17 00:00:00 2001 From: Mitya Selivanov <0x7fffff@guattari.ru> Date: Sun, 7 Aug 2022 00:56:05 +0400 Subject: Assertions limit check --- source/kit_test/run_tests.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'source/kit_test') diff --git a/source/kit_test/run_tests.c b/source/kit_test/run_tests.c index 333aa58..2adf5f4 100644 --- a/source/kit_test/run_tests.c +++ b/source/kit_test/run_tests.c @@ -7,16 +7,15 @@ struct kit_tests_list kit_tests_list = { 0 }; static void report(int i, char const *file, int line, int ok) { if (i >= KIT_TESTS_SIZE_LIMIT) { - printf("\nKit Test error: Too many tests!\n"); + printf("\nKit Test error: Too many tests!"); return; } int const n = kit_tests_list.tests[i].assertions++; if (n >= KIT_TEST_ASSERTIONS_LIMIT) { - printf("\nKit Test error: Too many test assertions for test " - "\"%s\"!\n", - kit_tests_list.tests[i].test_name); + printf("\nKit Test error: Too many test assertions!"); + kit_tests_list.tests[i].status[KIT_TEST_ASSERTIONS_LIMIT - 1] = 0; return; } -- cgit v1.2.3