* src/SDCCast.c (backPatchLabels): fixed bug #1504636
[fw/sdcc] / src / regression / struct1.c
index e8a5b0315990108d6e0947ef1d4731de1c8665c4..6929ecd6ccb6b3b69e1a05f7ab0d515b667db4e3 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
 
@@ -46,11 +44,10 @@ struct chars
 struct chars struct1;
 
 void
-done ()
+done()
 {
-
-  dummy++;
-
+  ASSERT(MANGLE(failures) == 0);
+  PASSED();
 }
 
 void
@@ -65,7 +62,7 @@ struct_test (void)
   if (struct1.c0 != 1)
     failures++;
 }
-
+/*
 void
 ptr_to_struct (struct chars *p)
 {
@@ -79,7 +76,7 @@ ptr_to_struct (struct chars *p)
   if (p->c1 != 1)
     failures++;
 }
-
+*/
 void add_chars(void)
 {
 
@@ -97,12 +94,11 @@ main (void)
   struct1.c0 = 0;
   struct1.c1 = 0;
   struct_test ();
-  ptr_to_struct (&struct1);
+  //  ptr_to_struct (&struct1);
 
   struct1.c0 = 0;
   struct1.c1 = 1;
   add_chars();
 
-  success = failures;
   done ();
 }