fixes, moved ir test driver to testir.c
[henge/webcc.git] / src / bin / tools / testir.c
similarity index 79%
rename from src/bin/tools/ir.c
rename to src/bin/tools/testir.c
index 243fa3a..69c9c28 100644 (file)
 #define CYAN    "\x1b[36m"
 #define CLRX    "\x1b[0m" //clear current color
 
+extern //ir.c
+void ir_quit(void);
+extern
+int ir_init(void);
+extern
+
+
 int main(void);
 int test_init(void);
-int test_malloc(void);
 
 int
 main
 ()
 { test_init();
-  test_malloc();
   return 0;
 }
 
@@ -35,14 +40,15 @@ test_init
 ()
 { /* Test Init */
   printf("YELLOW Initializing\n");
-  ir_init();
+  if (ir_init())
+    { printf("RED FAILED CLRX");
+      perror("ir init");
+      return 1;
+    }
   printf("Quitting CLRX\n");
   ir_quit();
+  printf("GREEN PASS");
   return 0;
 }
 
-int
-test_malloc
-()
-{ return 0;
-}
+