X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fregression%2Fsub2.c;h=44b54d5e66aab72511161bac6baf09ac8090cd30;hb=c04cbf8f911eb7d49d830339f2f820ecce377125;hp=b4c7891f2801edd3c98daedd113aba375ed642d8;hpb=090ce4761d96fdbf019e1ecb87b2c6bb8dbefb5a;p=fw%2Fsdcc diff --git a/src/regression/sub2.c b/src/regression/sub2.c index b4c7891f..44b54d5e 100644 --- a/src/regression/sub2.c +++ b/src/regression/sub2.c @@ -1,17 +1,15 @@ -//#include "p16c84.h" +#include "gpsim_assert.h" // Addition tests /* 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 /* Some compilers that support bit types do not support bit arithmetic * (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(); }