*src/SDCCicode.c: fixed bug #1870216 - Error 122: dividing by zero
[fw/sdcc] / src / regression / add3.c
index e218dc15cd0556a681d9e9631314934f68aecfe7..a1990af0c18d2e7cbd7e05938dd16270e8a61c9d 100644 (file)
@@ -1,14 +1,13 @@
+#include "gpsim_assert.h"
 
 // Addition tests - mostly int's
 
 /* bit types are not ANSI - so provide a way of disabling bit types
  * if this file is used to test other compilers besides SDCC */
-#define SUPPORT_BIT_TYPES 1
+#define SUPPORT_BIT_TYPES 0
 
 
-unsigned char success=0;
 unsigned char failures=0;
-unsigned char dummy=0;
 
 
 char char0 = 0;
@@ -39,11 +38,11 @@ bit bit11 = 0;
 #endif
 
 
-void done()
+void
+done()
 {
-
-  dummy++;
-
+  ASSERT(MANGLE(failures) == 0);
+  PASSED();
 }
 
 void add_char2char(void)
@@ -215,6 +214,5 @@ void main(void)
   add_lit2long();
   add_lit2ulong();
 
-  success = failures;
   done();
 }