Mercurial > pub > dyncall > dyncall
comparison test/call_suite/main.c @ 506:ed7d1f5e7973
- test cases: cosmetics for consistency
author | Tassilo Philipp |
---|---|
date | Sat, 09 Apr 2022 13:57:27 +0200 |
parents | f263eb7a206e |
children | a0c51f34023a |
comparison
equal
deleted
inserted
replaced
505:049e04af13c8 | 506:ed7d1f5e7973 |
---|---|
31 | 31 |
32 | 32 |
33 static void* G_callvm; | 33 static void* G_callvm; |
34 | 34 |
35 | 35 |
36 static int invoke(char const* signature, void* t) | 36 static int invoke(const char *signature, void* t) |
37 { | 37 { |
38 DCCallVM * p = (DCCallVM*) G_callvm; | 38 DCCallVM * p = (DCCallVM*) G_callvm; |
39 const char * sig = signature; | 39 const char * sig = signature; |
40 const char * rtype; | 40 const char * rtype; |
41 char atype; | 41 char atype; |
123 pos++; | 123 pos++; |
124 } | 124 } |
125 return 1; | 125 return 1; |
126 } | 126 } |
127 | 127 |
128 int run_test(int i) | 128 static int run_test(int i) |
129 { | 129 { |
130 char const * sig; | 130 char const * sig; |
131 void * target; | 131 void * target; |
132 int success; | 132 int success; |
133 sig = G_sigtab[i]; | 133 sig = G_sigtab[i]; |
136 success = invoke(sig,target); | 136 success = invoke(sig,target); |
137 printf("%d\n",success); | 137 printf("%d\n",success); |
138 return success; | 138 return success; |
139 } | 139 } |
140 | 140 |
141 int run_all() | 141 static int run_all() |
142 { | 142 { |
143 int i; | 143 int i; |
144 int failure = 0; | 144 int failure = 0; |
145 for(i=0;i<G_ncases;++i) | 145 for(i=0;i<G_ncases;++i) |
146 failure |= !( run_test(i) ); | 146 failure |= !( run_test(i) ); |