summaryrefslogtreecommitdiff
path: root/source/kit_test/test.c
diff options
context:
space:
mode:
authorMitya Selivanov <0x7fffff@guattari.ru>2022-08-08 04:33:27 +0400
committerMitya Selivanov <0x7fffff@guattari.ru>2022-08-08 04:33:27 +0400
commit65a298e7415e6785d30681cf0cb9aae0e4965fbe (patch)
treeff28e9dbed5779fb2841b9db47c74091081fca19 /source/kit_test/test.c
parent47f271b51f6855ee531a06a1e582e78a66a763b0 (diff)
downloadkit-65a298e7415e6785d30681cf0cb9aae0e4965fbe.zip
Refactor
Diffstat (limited to 'source/kit_test/test.c')
-rw-r--r--source/kit_test/test.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/kit_test/test.c b/source/kit_test/test.c
index db3c68c..07c8871 100644
--- a/source/kit_test/test.c
+++ b/source/kit_test/test.c
@@ -1,6 +1,7 @@
#include "test.h"
#include <stdio.h>
+#include <string.h>
#include <time.h>
kit_tests_list_t kit_tests_list = { 0 };
@@ -42,8 +43,8 @@ static void color_code(int term_color, int c) {
void kit_test_register(char const *name, kit_test_run_fn fn) {
int n = kit_tests_list.size++;
if (n < KIT_TESTS_SIZE_LIMIT) {
- kit_tests_list.tests[n].test_fn = fn;
- strcpy(kit_tests_list.tests[n].test_name, name);
+ kit_tests_list.tests[n].test_fn = fn;
+ kit_tests_list.tests[n].test_name = name;
kit_tests_list.tests[n].assertions = 0;
}
}