Added basic test execution collector and runner and some reference assertions

This commit is contained in:
2021-02-15 07:47:13 +05:00
commit 612c64ca21
10 changed files with 231 additions and 0 deletions

19
include/ctest.h Normal file
View File

@ -0,0 +1,19 @@
#ifndef CTEST_H
#define CTEST_H
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct test_structure
{
int result;
char *name;
} test_t;
void run_tests(int *which);
test_t *new_test(int res, char *name);
void free_test(test_t *o_t);
void test(int res, char *name);
#endif

8
include/funcs.h Normal file
View File

@ -0,0 +1,8 @@
#ifndef FUNCS_H
#define FUNCS_H
int is_equal(void *res, void *correct);
int is_true(void *res);
int is_false(void *res);
#endif