From ab7096fadb01cc3eb1a4d687ba5b4cbb326a0a8c Mon Sep 17 00:00:00 2001 From: dx Date: Wed, 6 May 2020 03:45:59 +0100 Subject: +simple testing argument to executable in main If argc is greater than 1 and the second argument is --test then run tests. --- Converter/src/main.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'Converter') diff --git a/Converter/src/main.c b/Converter/src/main.c index 7ca85e8..8d03c02 100644 --- a/Converter/src/main.c +++ b/Converter/src/main.c @@ -1,9 +1,17 @@ #include "../includes/compiler.h" +#include "../includes/test.h" #include #include #include -int main() +int main(int argc, char *argv[]) { - return 0; + if (argc > 1) + { + if (strncmp(argv[1], "--test", 7) == 0) + { + // run tests + test_header_depths(); + } + } } -- cgit v1.2.3-13-gbd6f