* device/include/pic16/pic18f*.h: add bit aliases in INTCONbits_t
[fw/sdcc] / src / regression / compare9.c
index 6e4fa3c5a8c59935cb73b9e270b4898b397f7b5e..96e7682766b82463b1f28e8213137369af9f5ed1 100644 (file)
@@ -1,3 +1,5 @@
+#include "gpsim_assert.h"
+#include "picregs.h"
 // Signed comparisons of the form:  (variable<=LIT)
 //
 // This regression test exercises all of the boundary
@@ -6,9 +8,7 @@
 // and each one has an astonishing capability of failing
 // a boundary condition.
 
-unsigned char success = 0;
 unsigned char failures = 0;
-unsigned char dummy = 0;
 unsigned char result = 0;
 
 int int0 = 0;
@@ -16,13 +16,22 @@ int int1 = 0;
 signed char char0 = 0;
 signed char char1 = 0;
 
+/* *** NOTE ***  This particular test takes quite a while to run 
+ * ~ 10,000,000 instruction cycles. (2.5 seconds on a 20Mhz PIC).
+ * The WDT will reset the CPU if it's enabled. So disable it...
+*/
+
+typedef unsigned int word;
+
+//word at 0x2007  CONFIG = wdt_off & pwrte_on;
+
 void
-done ()
+done()
 {
-  dummy++;
+  ASSERT(MANGLE(failures) == 0);
+  PASSED();
 }
 
-
 void c_char_lte_lit1(unsigned char expected_result)
 {
   result = 0;
@@ -289,6 +298,5 @@ main (void)
   int_compare1();
   int_compare2();
 
-  success = failures;
   done ();
 }