Added basic test execution collector and runner and some reference assertions
This commit is contained in:
19
include/ctest.h
Normal file
19
include/ctest.h
Normal 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
8
include/funcs.h
Normal 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
|
Reference in New Issue
Block a user