summaryrefslogtreecommitdiff
path: root/source/kit_test
diff options
context:
space:
mode:
authorMitya Selivanov <0x7fffff@guattari.ru>2022-08-07 00:56:05 +0400
committerMitya Selivanov <0x7fffff@guattari.ru>2022-08-07 00:56:05 +0400
commit5f4f86fc9a558e8d0bbf068e36ab7432914ae945 (patch)
treeb0882ffa37b8057b0b479f946c4dd3b3e1d7fbca /source/kit_test
parent3cfe668e7628dbcb06ea3c3b54261e202d148300 (diff)
downloadkit-5f4f86fc9a558e8d0bbf068e36ab7432914ae945.zip
Assertions limit check
Diffstat (limited to 'source/kit_test')
-rw-r--r--source/kit_test/run_tests.c7
1 files changed, 3 insertions, 4 deletions
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;
}