*/
#include <testfwk.h>
#include <string.h>
-#include <stdio.h>
int
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
testBP(void)
{
char above[ABOVE_MEM_SIZE];
- char f;
+ int f;
char below[BELOW_MEM_SIZE];
memset(above, ABOVE_MEM_TEST_SIZE, sizeof(above));
ASSERT(verifyBlock(above, ABOVE_MEM_TEST_SIZE, sizeof(above)));
ASSERT(verifyBlock(below, BELOW_MEM_TEST_SIZE, sizeof(below)));
+
}