# HG changeset patch # User Tassilo Philipp # Date 1649505447 -7200 # Node ID ed7d1f5e79734d4fb10efa63e6457ab38ec8bb2b # Parent 049e04af13c8db8b778fb225629e41d106b24daa - test cases: cosmetics for consistency diff -r 049e04af13c8 -r ed7d1f5e7973 test/call_suite/globals.h --- a/test/call_suite/globals.h Sat Apr 09 13:53:58 2022 +0200 +++ b/test/call_suite/globals.h Sat Apr 09 13:57:27 2022 +0200 @@ -33,7 +33,7 @@ typedef void (*funptr)(); extern funptr G_funtab[]; -extern char const * G_sigtab[]; +extern const char * G_sigtab[]; extern int G_ncases; extern int G_maxargs; diff -r 049e04af13c8 -r ed7d1f5e7973 test/call_suite/main.c --- a/test/call_suite/main.c Sat Apr 09 13:53:58 2022 +0200 +++ b/test/call_suite/main.c Sat Apr 09 13:57:27 2022 +0200 @@ -33,7 +33,7 @@ static void* G_callvm; -static int invoke(char const* signature, void* t) +static int invoke(const char *signature, void* t) { DCCallVM * p = (DCCallVM*) G_callvm; const char * sig = signature; @@ -125,7 +125,7 @@ return 1; } -int run_test(int i) +static int run_test(int i) { char const * sig; void * target; @@ -138,7 +138,7 @@ return success; } -int run_all() +static int run_all() { int i; int failure = 0; diff -r 049e04af13c8 -r ed7d1f5e7973 test/call_suite/mk-cases.lua --- a/test/call_suite/mk-cases.lua Sat Apr 09 13:53:58 2022 +0200 +++ b/test/call_suite/mk-cases.lua Sat Apr 09 13:57:27 2022 +0200 @@ -32,7 +32,7 @@ end function mksigtab(sigs) - local s = { "char const * G_sigtab[] = {\n"} + local s = { "const char * G_sigtab[] = {\n"} for k,v in pairs(sigs) do s[#s+1] = '\t"'..v..'",\n' end diff -r 049e04af13c8 -r ed7d1f5e7973 test/call_suite_aggrs/README.txt --- a/test/call_suite_aggrs/README.txt Sat Apr 09 13:53:58 2022 +0200 +++ b/test/call_suite_aggrs/README.txt Sat Apr 09 13:57:27 2022 +0200 @@ -2,8 +2,8 @@ Tests aggregates (structs, unions and arrays) passed by value, along with other, non-aggregate args. Note, arrays are only passed/returned by value as -members of structs and unions, as they woult decay to a pointer if passed to a -function and cannot be returned. +members of structs and unions, as they would decay to a pointer in C if passed +to a function, and cannot be returned. So this test suite does not generate any arrays outside of structs and unions. A macro AGGR_MISALIGN can be used in globals.c to intentionally misalign diff -r 049e04af13c8 -r ed7d1f5e7973 test/call_suite_aggrs/globals.h --- a/test/call_suite_aggrs/globals.h Sat Apr 09 13:53:58 2022 +0200 +++ b/test/call_suite_aggrs/globals.h Sat Apr 09 13:57:27 2022 +0200 @@ -33,10 +33,10 @@ typedef void (*funptr)(); extern funptr G_funtab[]; -extern char const * G_sigtab[]; +extern const char * G_sigtab[]; extern int G_ncases; extern int G_maxargs; -extern char const * G_agg_sigs[]; +extern const char * G_agg_sigs[]; extern int G_agg_sizes[]; extern funptr G_agg_touchdcstfuncs[]; extern funptr G_agg_cmpfuncs[]; diff -r 049e04af13c8 -r ed7d1f5e7973 test/call_suite_aggrs/main.c --- a/test/call_suite_aggrs/main.c Sat Apr 09 13:53:58 2022 +0200 +++ b/test/call_suite_aggrs/main.c Sat Apr 09 13:57:27 2022 +0200 @@ -46,7 +46,7 @@ return -1; } -static int invoke(char const* signature, void* t) +static int invoke(const char *signature, void* t) { DCCallVM * p = (DCCallVM*) G_callvm; const char * sig = signature; @@ -199,7 +199,7 @@ return 1; } -int run_test(int i) +static int run_test(int i) { char const * sig; void * target; @@ -212,7 +212,7 @@ return success; } -int run_all() +static int run_all() { int i; int failure = 0; diff -r 049e04af13c8 -r ed7d1f5e7973 test/call_suite_aggrs/mk-cases.lua --- a/test/call_suite_aggrs/mk-cases.lua Sat Apr 09 13:53:58 2022 +0200 +++ b/test/call_suite_aggrs/mk-cases.lua Sat Apr 09 13:57:27 2022 +0200 @@ -120,7 +120,7 @@ end function mksigtab(sigs) - local s = { "char const * G_sigtab[] = {\n"} + local s = { "const char * G_sigtab[] = {\n"} for k,v in pairs(sigs) do s[#s+1] = '\t"'..v..'",\n' end