main
 1#include <stdio.h>
 2#include <string.h>
 3#include "reverse.h"
 4#include "assertions.h"
 5
 6typedef int (*Test)();
 7
 8int test_string_reversal()
 9{
10	char input[32];
11	strcpy( input, "tell The Truth");
12	reverse(input);
13	return assert_equals(input, "hturT ehT llet");
14}
15
16void run(Test *tests)
17{
18	int i;
19	for (i = 0; i < sizeof(tests); i++) {
20		Test test = tests[i];
21		if(NULL == test) break;
22		test();
23	}
24}
25
26void run_tests()
27{
28	Test tests[10] = {
29		&test_string_reversal
30	};
31
32	run(tests);
33}