3 \details This is a testing driver for the IR system of APC.
6 ----------------------------------------------------------------------------*/
8 #include <stdio.h> //print
10 #include <errno.h> //lib errors
13 int scanner_init(void);
15 void scanner_quit(void);
17 /* Ansi Term Colors */
18 #define RED "\x1b[31m"
19 #define GREEN "\x1b[32m"
20 #define YELLOW "\x1b[33m"
21 #define BLUE "\x1b[34m"
22 #define MAGENTA "\x1b[35m"
23 #define CYAN "\x1b[36m"
24 #define CLRC "\x1b[0m" //clear current color
31 #define PRINTFAIL(U) printf(RED $(U) " FAILED\n" CLRC)
32 #define PRINTPASS(U) printf(GREEN $(U) " PASSED\n" CLRC)
33 #define PRINTINFO(S) printf(YELLOW S CLRC)
34 #define RUN_UNIT(U,T) \
42 { RUN_UNIT(test_init
,"Initializing\n");
50 printf("Init Run %-2i\n",n
+1);
52 { perror("scanner init");
56 return (++n
< TESTS
) ? test_init() : scanner_init();