summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c30
1 files changed, 2 insertions, 28 deletions
diff --git a/src/main.c b/src/main.c
index b6f715f..8e6e0d5 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1,36 +1,10 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include "reverse.h"
-#include "assertions.h"
-
-typedef int (*Test)();
-
-int test_string_reversal()
-{
- char input[32];
- strcpy( input, "tell The Truth");
- reverse(input);
- return assert_equals(input, "hturT ehT llet");
-}
-
-void run(Test *tests)
-{
- int i;
- for (i = 0; i < sizeof(tests); i++) {
- Test test = tests[i];
- if(NULL == test) break;
- test();
- }
-}
+#include "tests.h"
int main(int argc, const char *argv[])
{
- Test tests[10] = {
- &test_string_reversal
- };
-
- run(tests);
-
+ run_tests();
return 0;
}