* support/regression/generate-cases.py: Fixed up to use function pts correctly.
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1414
4a8a32a2-be11-0410-ad9d-
d568d2c75423
#define FAIL() FAILM("Failure")
#define FAILM(_a) __fail(_a, #_a, __FILE__, __LINE__)
-typedef void TESTFUN(void);
+typedef void (*TESTFUNP)(void);
// Provided by the suite
-void **
+TESTFUNP *
suite(void);
const char *
int
main(void)
{
- TESTFUN **cases;
+ TESTFUNP *cases;
int numCases = 0;
__printf("--- Running: %s\n", getSuiteName());
- cases = (TESTFUN **)suite();
+ cases = suite();
while (*cases) {
__printf("Running %u\n", numCases);
# Start of the test function table definition
testfuntableheader = """
-static void (*const _tests[])(void) = {
+static TESTFUNP _tests[] = {
"""
# Code to generate the suite function
testfunsuite = """
-void **
+TESTFUNP *
suite(void)
{
- return (void **)_tests;
+ return _tests;
}
const char *
--- /dev/null
+/* Tests usage of constant modifiers.
+ */
+#include <testfwk.h>
+
+void
+testUMod(void)
+{
+ volatile unsigned char a = 0;
+
+ ASSERT((a |= 0xFFL) == 0xFFL);
+}
}
void
-spoilPtr(char *p)
+spoilPtr(volatile char *p)
{
UNUSED(p);
}