* device/lib/Makefile.in, device/lib/gbz80/Makefile.in,
[fw/sdcc] / support / regression / tests / bp.c
index f534c98e4dd1c011ef14ea5d9bb0d151330282ed..029ee315cfd819d08aabef4bc3a931fea7455b67 100644 (file)
@@ -2,7 +2,6 @@
  */
 #include <testfwk.h>
 #include <string.h>
-#include <stdio.h>
 
 int
 verifyBlock(char *p, char val, int len)
@@ -15,26 +14,26 @@ verifyBlock(char *p, char val, int len)
   return 1;
 }
 
-char
-spoil(char a)
+int
+spoil(int a)
 {
   return a;
 }
 
-#ifndef SDCC_mcs51
+#if defined(SDCC_mcs51) || defined(SDCC_pic16)
 
-#define ABOVE_MEM_SIZE      400
+// test devices with much less memory
+#define ABOVE_MEM_SIZE       30
 #define ABOVE_MEM_TEST_SIZE  17
-#define BELOW_MEM_SIZE      200
-#define BELOW_MEM_TEST_SIZE  74
+#define BELOW_MEM_SIZE       20
+#define BELOW_MEM_TEST_SIZE   7
 
 #else
 
-// test mcs51 with much less memory
-#define ABOVE_MEM_SIZE       35
+#define ABOVE_MEM_SIZE      400
 #define ABOVE_MEM_TEST_SIZE  17
-#define BELOW_MEM_SIZE       20
-#define BELOW_MEM_TEST_SIZE   7
+#define BELOW_MEM_SIZE      200
+#define BELOW_MEM_TEST_SIZE  74
 
 #endif
 
@@ -42,7 +41,7 @@ void
 testBP(void)
 {
   char above[ABOVE_MEM_SIZE];
-  char f;
+  int f;
   char below[BELOW_MEM_SIZE];
 
   memset(above, ABOVE_MEM_TEST_SIZE, sizeof(above));
@@ -56,4 +55,5 @@ testBP(void)
 
   ASSERT(verifyBlock(above, ABOVE_MEM_TEST_SIZE, sizeof(above)));
   ASSERT(verifyBlock(below, BELOW_MEM_TEST_SIZE, sizeof(below)));
+
 }