*/
#include <testfwk.h>
-#define XDATA
+#ifdef __mcs51
+# define XDATA xdata
+#else
+# define XDATA
+#endif
XDATA static char x[10][20];
static void
testMultiDimensionalAddress(void)
{
- ASSERT(getAddrOfCell(5, 6) == (char *)x + 106);
+ ASSERT(getAddrOfCell(5, 6) == (char XDATA *)x + 106);
}
*/
#include <testfwk.h>
-static unsigned char _data[] = {
+static unsigned char __data[] = {
1, 2, 3, 4
};
{
// BUG, there will be a PRE-increment
return p[s.index++];
-}
+}
void
testPostIncrement(void)
{
- p = _data;
+ p = __data;
ASSERT(foo() == 1);
ASSERT(foo() == 2);
ASSERT(foo() == 3);
ASSERT(smallDense[5] == 6);
}
+#ifdef __mcs51
+idata
+#endif
static {type} smallSparse[] = {
1, 1, 1, 1, 1, 1, 1, 1, 1
};
ASSERT(smallSparse[8] == 1);
}
+#ifdef __mcs51
+idata
+#endif
static {type} smallSparseZero[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0
};
ASSERT(smallSparseZero[8] == 0);
}
+#ifdef __mcs51
+xdata
+#endif
static {type} largeMixed[] = {
1, 2, 3, 4, 5, 6, 7, /* 0-6 */
1, 1, 1, 1, 1, 1, 1, 1,