X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fregression%2Fcompare10.c;h=b7178eb389832b155db5c2181bc2ee35f62d3f3b;hb=3bd25d75bcad68055bb616dcc29dde8a2965965e;hp=f8f045c35f68d1f291e9f722da33699da4345662;hpb=8bad3436d92f6b13ffc24583e3688e23021a62be;p=fw%2Fsdcc diff --git a/src/regression/compare10.c b/src/regression/compare10.c index f8f045c3..b7178eb3 100644 --- a/src/regression/compare10.c +++ b/src/regression/compare10.c @@ -1,3 +1,6 @@ +#include "gpsim_assert.h" +#include "picregs.h" + // Signed comparisons of the form: (variable>=LIT) // // This regression test exercises all of the boundary @@ -6,9 +9,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; //bit bit0 = 0; @@ -21,10 +22,20 @@ signed char char1 = 0; char long0 = 0; char long1 = 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(); } @@ -304,6 +315,5 @@ main (void) int_compare1(); int_compare2(); - success = failures; done (); }