Mercurial > pub > dyncall > dyncall
diff test/callback_suite/README.txt @ 509:f3d44195dbdf
callback_suite:
- further, big refactoring to make the test data setup be a lot more in line with call_suite and call_suite_aggrs
- added support to test void return values (was missing in prev version)
author | Tassilo Philipp |
---|---|
date | Sat, 09 Apr 2022 23:00:24 +0200 |
parents | 1aa2af848e8a |
children | 95f6f43178ed |
line wrap: on
line diff
--- a/test/callback_suite/README.txt Sat Apr 09 14:44:33 2022 +0200 +++ b/test/callback_suite/README.txt Sat Apr 09 23:00:24 2022 +0200 @@ -11,8 +11,8 @@ Generates a set of callback invokers in C using lua as a preprocessor. -The invokers pass arguments to the callback to test from a set of reference -values which are argument type- and position-specific. +The invokers pass random arguments to the callback to test, from a set of +reference values which are argument type- and position-specific. The Callback Invocation Body @@ -22,26 +22,17 @@ void f19(void* addr) { - Result.p = ((CONFIG_API p(*)(d,p,d,f))addr)(ValueMatrix[0].d,ValueMatrix[1].p,ValueMatrix[2].d,ValueMatrix[3].f); -} ^^^^^^^^^^- specific calling convention - ^^^^^^^^^^^^^- signature - ^- return type signature - ^- arg signature char 0 value (to be retrieved in handler) - + V_p[4] = ((CONFIG_API p(*)(d,p,d,f))addr)(K_d[0],K_p[1],K_d[2],K_f[3]); +} ^^^^^^^^^^- specific calling convention + ^^^^^^^^^^^^^- signature + ^- return type ^^^^- dyncallback object + ^- args from reference values (to be retrieved in handler) -Result (type DCValue) and ValueMatrix (type DCValueSet[MAXARGS], holding the -reference values) are globals, as well as an Args (type DCValue) array, which -is used by the callback handler to write the received argument values to. - - -Reference argument and result value +The K_? values are the reference values, which are supposed to be copied to +V_?, and are compared for identity after invocation. The arguments are copied +to V_? in the callback handler, called through "addr". -The reference values are generated by get_reference_arg() and -get_reference_result(), which always return the exact same value for the a -given set of arguments. -ValueMatrix was filled by those functions and thus holds a temporary copy, -which is useful to test whether any input argument was modified (which should -never be the case). +The reference values stored in K_? are generated once, randomly, at startup. Testing for exotic calling conventions on Windows