aboutsummaryrefslogtreecommitdiff
path: root/test_runner.c
blob: 9d3ad652018d426b4418399c860a76af01cb63d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <stdio.h>

#include "test_runner.h"
#include "unity.h"

/* unity requires these, even if empty */
void setUp(){};
void tearDown(){};

int main(void)
{
	struct test_fn *tests = list_head(struct test_fn, test_list);
	size_t count = list_entry_count(struct test_fn, test_list);
	printf("Suite has %zd tests\n", count);
	UNITY_BEGIN();
	for (size_t i = 0; i < count; i++) {
		UnitySetTestFile(tests[i].file);
		UnityDefaultTestRun(tests[i].fn, tests[i].name, tests[i].line);
	}
	UNITY_END();
}