X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fregression%2Fadd2.c;h=f9536e4db1fe584e4cd3b032246de6bd5e4bb23f;hb=d5427ad1f11f9e69b9f26a2184dd4ae5d285ec4b;hp=5680838521b44e7da8792534473033c5764cca8f;hpb=773c6338a70b9cd56d206cf4d7994142889970ca;p=fw%2Fsdcc diff --git a/src/regression/add2.c b/src/regression/add2.c index 56808385..f9536e4d 100644 --- a/src/regression/add2.c +++ b/src/regression/add2.c @@ -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; unsigned int aint0 = 0; @@ -39,11 +38,11 @@ bit bit11 = 0; #endif -void done() +void +done() { - - dummy++; - + ASSERT(MANGLE(failures) == 0); + PASSED(); } void add_lit2uint(void) @@ -161,6 +160,7 @@ void add_bits(void) /* add_bit2uchar(void) - assumes bit0 = 1, aint0 = 7 */ +#if SUPPORT_BIT_TYPES void add_bit2uchar(void) { @@ -185,6 +185,7 @@ void add_bit2uint(void) failures++; } +#endif /***********************************/ @@ -321,6 +322,5 @@ void main(void) aint0 = 0; addlits(); - success = failures; done(); }