annotate test/callback_suite/globals.h @ 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 /*
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
2
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
3 Package: dyncall
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
4 Library: test
505
049e04af13c8 test/callback_suite:
Tassilo Philipp
parents: 487
diff changeset
5 File: test/callback_suite/globals.h
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
6 Description:
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
7 License:
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
8
505
049e04af13c8 test/callback_suite:
Tassilo Philipp
parents: 487
diff changeset
9 Copyright (c) 2011-2022 Daniel Adler <dadler@uni-goettingen.de>,
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
10 Tassilo Philipp <tphilipp@potion-studios.com>
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
11
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
12 Permission to use, copy, modify, and distribute this software for any
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
13 purpose with or without fee is hereby granted, provided that the above
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
14 copyright notice and this permission notice appear in all copies.
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
15
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
16 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
17 WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
18 MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
19 ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
20 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
21 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
22 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
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
509
f3d44195dbdf callback_suite:
Tassilo Philipp
parents: 505
diff changeset
26
f3d44195dbdf callback_suite:
Tassilo Philipp
parents: 505
diff changeset
27 #include "dyncall_types.h"
487
d8f0e6cecdab - simplified test/callback_suite
Tassilo Philipp
parents: 281
diff changeset
28
d8f0e6cecdab - simplified test/callback_suite
Tassilo Philipp
parents: 281
diff changeset
29
509
f3d44195dbdf callback_suite:
Tassilo Philipp
parents: 505
diff changeset
30 #define DEF_TYPES \
487
d8f0e6cecdab - simplified test/callback_suite
Tassilo Philipp
parents: 281
diff changeset
31 X(B,DCbool) \
d8f0e6cecdab - simplified test/callback_suite
Tassilo Philipp
parents: 281
diff changeset
32 X(c,DCchar) X(C,DCuchar) X(s,DCshort) X(S,DCushort) \
d8f0e6cecdab - simplified test/callback_suite
Tassilo Philipp
parents: 281
diff changeset
33 X(i,DCint) X(I,DCuint) X(j,DClong) X(J,DCulong) \
d8f0e6cecdab - simplified test/callback_suite
Tassilo Philipp
parents: 281
diff changeset
34 X(l,DClonglong) X(L,DCulonglong) \
d8f0e6cecdab - simplified test/callback_suite
Tassilo Philipp
parents: 281
diff changeset
35 X(f,DCfloat) X(d,DCdouble) \
d8f0e6cecdab - simplified test/callback_suite
Tassilo Philipp
parents: 281
diff changeset
36 X(p,DCpointer) X(Z,DCpointer)
d8f0e6cecdab - simplified test/callback_suite
Tassilo Philipp
parents: 281
diff changeset
37
509
f3d44195dbdf callback_suite:
Tassilo Philipp
parents: 505
diff changeset
38 #define X(CH,T) extern T *K_##CH; extern T *V_##CH;
f3d44195dbdf callback_suite:
Tassilo Philipp
parents: 505
diff changeset
39 DEF_TYPES
487
d8f0e6cecdab - simplified test/callback_suite
Tassilo Philipp
parents: 281
diff changeset
40 #undef X
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
41
505
049e04af13c8 test/callback_suite:
Tassilo Philipp
parents: 487
diff changeset
42 typedef void (*funptr)(void*);
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
43
505
049e04af13c8 test/callback_suite:
Tassilo Philipp
parents: 487
diff changeset
44 extern funptr G_funtab[];
049e04af13c8 test/callback_suite:
Tassilo Philipp
parents: 487
diff changeset
45 extern const char * G_sigtab[];
049e04af13c8 test/callback_suite:
Tassilo Philipp
parents: 487
diff changeset
46 extern int G_ncases;
049e04af13c8 test/callback_suite:
Tassilo Philipp
parents: 487
diff changeset
47 extern int G_maxargs;
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
48
505
049e04af13c8 test/callback_suite:
Tassilo Philipp
parents: 487
diff changeset
49 void init_test_data();
049e04af13c8 test/callback_suite:
Tassilo Philipp
parents: 487
diff changeset
50 void deinit_test_data();
509
f3d44195dbdf callback_suite:
Tassilo Philipp
parents: 505
diff changeset
51 void clear_V();
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
52