* src/regression/add.c, src/regression/add2.c, src/regression/add3.c,
[fw/sdcc] / src / regression / sub2.c
index b4c7891f2801edd3c98daedd113aba375ed642d8..60c1c9096f5964f8ce125ea6156ee62b96c72caa 100644 (file)
@@ -1,4 +1,4 @@
-//#include "p16c84.h"
+#include "gpsim_assert.h"
 // Addition tests
 
 /* bit types are not ANSI - so provide a way of disabling bit types
@@ -9,9 +9,7 @@
  * (like bitx = bity + bitz;) */
 #define SUPPORT_BIT_ARITHMETIC 1
 
-unsigned char success=0;
 unsigned char failures=0;
-unsigned char dummy=0;
 
 #if SUPPORT_BIT_TYPES
 
@@ -37,11 +35,11 @@ char char1 = 0;
 char char2 = 0;
 
 
-void done()
+void
+done()
 {
-
-  dummy++;
-
+  ASSERT(MANGLE(failures) == 0);
+  PASSED();
 }
 
 void sub_int1(void)
@@ -170,6 +168,5 @@ void main(void)
   int1 = 9;
   sub_compound_int();
 
-  success = failures;
   done();
 }