annotate test/callback_suite/config-stress1.lua @ 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 049e04af13c8
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
1 -- section 'main' --------------------------------------------------------------
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
2
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
3 mode = "designed" -- generator mode: 'random', 'ordered' or 'designed' type sequences
503
e6d8ae2a116c - test/callback_suite: changed filename for consistency
Tassilo Philipp
parents: 495
diff changeset
4 designfile= "stress1.txt" -- design file
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
5
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
6 function nlines()
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
7 local cnt = 0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
8 for l in io.open(designfile):lines() do
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
9 cnt = cnt + 1
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
10 end
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
11 return cnt
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
12 end
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
13
495
45ac093ca822 - test/callback_suite: make it use shared random sig generator from call_suite and call_suite_aggrs
Tassilo Philipp
parents: 0
diff changeset
14 ncases = nlines() -- number of test cases
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
15
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
16 minargs = 0 -- minimum num. of supported arguments (>= 0)
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
17 maxargs = 20 -- maximum num. of supported arguments (>= minargs)
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
18
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
19 -- section 'types' (not used by 'designed') ------------------------------------
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
20
495
45ac093ca822 - test/callback_suite: make it use shared random sig generator from call_suite and call_suite_aggrs
Tassilo Philipp
parents: 0
diff changeset
21 types = "BcCsSiIjJlLpfd" -- "BcCsSiIjJlLpfd" -- supported argument types
509
f3d44195dbdf callback_suite:
Tassilo Philipp
parents: 505
diff changeset
22 rtypes = nil -- supported return types (set to nil to use "v"..types)
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
23
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
24
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
25 -- section 'ordered' -----------------------------------------------------------
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
26
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
27 offset = 0 -- permutation index offset (default = 1)
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
28 step = 1 -- permutation index increment (default = 1)
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
29
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
30
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
31 -- section 'random' ------------------------------------------------------------
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
32
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
33 seed = 1 -- random seed
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
34
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
35
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
36 -- section 'calling convention' (useful on Windows for now) --------------------
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
37
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
38 api = "" -- calling convention ("__stdcall" or "__fastcall")
505
049e04af13c8 test/callback_suite:
Tassilo Philipp
parents: 503
diff changeset
39 -- for gcc use "__attribute__((__stdcall__))" or "__attribute__((__fastcall__))"
049e04af13c8 test/callback_suite:
Tassilo Philipp
parents: 503
diff changeset
40 -- for ms ?
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
41 ccprefix = "" -- signature prefix ("_s" (stdcall), "_f" (gcc fastcall) or "_F" (microsoft fastcall))