annotate test/suite_aggrs/globals.h @ 457:90b1d927912a

- suite_aggrs: make sure random memory used doesn't ever result in NaN fp values (for every possible address), as this messes with result comparison
author Tassilo Philipp
date Fri, 28 Jan 2022 14:11:21 +0100
parents 4bd3ed699de8
children 1c18c2377c24
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
432
167faab0c0be first usable version of test suite for aggregates, handling only non-nested struct params, at the moment;
Tassilo Philipp
parents:
diff changeset
1 /*
167faab0c0be first usable version of test suite for aggregates, handling only non-nested struct params, at the moment;
Tassilo Philipp
parents:
diff changeset
2
167faab0c0be first usable version of test suite for aggregates, handling only non-nested struct params, at the moment;
Tassilo Philipp
parents:
diff changeset
3 Package: dyncall
167faab0c0be first usable version of test suite for aggregates, handling only non-nested struct params, at the moment;
Tassilo Philipp
parents:
diff changeset
4 Library: test
445
4bd3ed699de8 name fix
Tassilo Philipp
parents: 438
diff changeset
5 File: test/suite_aggrs/globals.h
432
167faab0c0be first usable version of test suite for aggregates, handling only non-nested struct params, at the moment;
Tassilo Philipp
parents:
diff changeset
6 Description:
167faab0c0be first usable version of test suite for aggregates, handling only non-nested struct params, at the moment;
Tassilo Philipp
parents:
diff changeset
7 License:
167faab0c0be first usable version of test suite for aggregates, handling only non-nested struct params, at the moment;
Tassilo Philipp
parents:
diff changeset
8
167faab0c0be first usable version of test suite for aggregates, handling only non-nested struct params, at the moment;
Tassilo Philipp
parents:
diff changeset
9 Copyright (c) 2022 Tassilo Philipp <tphilipp@potion-studios.com>
167faab0c0be first usable version of test suite for aggregates, handling only non-nested struct params, at the moment;
Tassilo Philipp
parents:
diff changeset
10
167faab0c0be first usable version of test suite for aggregates, handling only non-nested struct params, at the moment;
Tassilo Philipp
parents:
diff changeset
11 Permission to use, copy, modify, and distribute this software for any
167faab0c0be first usable version of test suite for aggregates, handling only non-nested struct params, at the moment;
Tassilo Philipp
parents:
diff changeset
12 purpose with or without fee is hereby granted, provided that the above
167faab0c0be first usable version of test suite for aggregates, handling only non-nested struct params, at the moment;
Tassilo Philipp
parents:
diff changeset
13 copyright notice and this permission notice appear in all copies.
167faab0c0be first usable version of test suite for aggregates, handling only non-nested struct params, at the moment;
Tassilo Philipp
parents:
diff changeset
14
167faab0c0be first usable version of test suite for aggregates, handling only non-nested struct params, at the moment;
Tassilo Philipp
parents:
diff changeset
15 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
167faab0c0be first usable version of test suite for aggregates, handling only non-nested struct params, at the moment;
Tassilo Philipp
parents:
diff changeset
16 WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
167faab0c0be first usable version of test suite for aggregates, handling only non-nested struct params, at the moment;
Tassilo Philipp
parents:
diff changeset
17 MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
167faab0c0be first usable version of test suite for aggregates, handling only non-nested struct params, at the moment;
Tassilo Philipp
parents:
diff changeset
18 ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
167faab0c0be first usable version of test suite for aggregates, handling only non-nested struct params, at the moment;
Tassilo Philipp
parents:
diff changeset
19 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
167faab0c0be first usable version of test suite for aggregates, handling only non-nested struct params, at the moment;
Tassilo Philipp
parents:
diff changeset
20 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
167faab0c0be first usable version of test suite for aggregates, handling only non-nested struct params, at the moment;
Tassilo Philipp
parents:
diff changeset
21 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
167faab0c0be first usable version of test suite for aggregates, handling only non-nested struct params, at the moment;
Tassilo Philipp
parents:
diff changeset
22
167faab0c0be first usable version of test suite for aggregates, handling only non-nested struct params, at the moment;
Tassilo Philipp
parents:
diff changeset
23 */
167faab0c0be first usable version of test suite for aggregates, handling only non-nested struct params, at the moment;
Tassilo Philipp
parents:
diff changeset
24
167faab0c0be first usable version of test suite for aggregates, handling only non-nested struct params, at the moment;
Tassilo Philipp
parents:
diff changeset
25
167faab0c0be first usable version of test suite for aggregates, handling only non-nested struct params, at the moment;
Tassilo Philipp
parents:
diff changeset
26 /* the 'a'ggregate type points to memory with random data that is big enough to hold all different struct types */
167faab0c0be first usable version of test suite for aggregates, handling only non-nested struct params, at the moment;
Tassilo Philipp
parents:
diff changeset
27 #define DEF_TYPES X(c,char) X(s,short) X(i,int) X(j,long) X(l,long long) X(p,void*) X(f,float) X(d,double) X(a,void*)
167faab0c0be first usable version of test suite for aggregates, handling only non-nested struct params, at the moment;
Tassilo Philipp
parents:
diff changeset
28
167faab0c0be first usable version of test suite for aggregates, handling only non-nested struct params, at the moment;
Tassilo Philipp
parents:
diff changeset
29 #define X(CH,T) extern T *K_##CH; extern T *V_##CH;
167faab0c0be first usable version of test suite for aggregates, handling only non-nested struct params, at the moment;
Tassilo Philipp
parents:
diff changeset
30 DEF_TYPES
167faab0c0be first usable version of test suite for aggregates, handling only non-nested struct params, at the moment;
Tassilo Philipp
parents:
diff changeset
31 #undef X
167faab0c0be first usable version of test suite for aggregates, handling only non-nested struct params, at the moment;
Tassilo Philipp
parents:
diff changeset
32
167faab0c0be first usable version of test suite for aggregates, handling only non-nested struct params, at the moment;
Tassilo Philipp
parents:
diff changeset
33 typedef void (*funptr)();
167faab0c0be first usable version of test suite for aggregates, handling only non-nested struct params, at the moment;
Tassilo Philipp
parents:
diff changeset
34
167faab0c0be first usable version of test suite for aggregates, handling only non-nested struct params, at the moment;
Tassilo Philipp
parents:
diff changeset
35 extern funptr G_funtab[];
167faab0c0be first usable version of test suite for aggregates, handling only non-nested struct params, at the moment;
Tassilo Philipp
parents:
diff changeset
36 extern char const * G_sigtab[];
167faab0c0be first usable version of test suite for aggregates, handling only non-nested struct params, at the moment;
Tassilo Philipp
parents:
diff changeset
37 extern int G_ncases;
167faab0c0be first usable version of test suite for aggregates, handling only non-nested struct params, at the moment;
Tassilo Philipp
parents:
diff changeset
38 extern int G_maxargs;
167faab0c0be first usable version of test suite for aggregates, handling only non-nested struct params, at the moment;
Tassilo Philipp
parents:
diff changeset
39 extern char const * G_agg_sigs[];
167faab0c0be first usable version of test suite for aggregates, handling only non-nested struct params, at the moment;
Tassilo Philipp
parents:
diff changeset
40 extern int G_agg_sizes[];
438
b4ddad459690 suite_aggr;
Tassilo Philipp
parents: 432
diff changeset
41 extern funptr G_agg_touchdcstfuncs[];
432
167faab0c0be first usable version of test suite for aggregates, handling only non-nested struct params, at the moment;
Tassilo Philipp
parents:
diff changeset
42 extern funptr G_agg_cmpfuncs[];
167faab0c0be first usable version of test suite for aggregates, handling only non-nested struct params, at the moment;
Tassilo Philipp
parents:
diff changeset
43 extern int G_naggs;
167faab0c0be first usable version of test suite for aggregates, handling only non-nested struct params, at the moment;
Tassilo Philipp
parents:
diff changeset
44
438
b4ddad459690 suite_aggr;
Tassilo Philipp
parents: 432
diff changeset
45 void init_test_data();
b4ddad459690 suite_aggr;
Tassilo Philipp
parents: 432
diff changeset
46 void deinit_test_data();
432
167faab0c0be first usable version of test suite for aggregates, handling only non-nested struct params, at the moment;
Tassilo Philipp
parents:
diff changeset
47 void clear_V();
167faab0c0be first usable version of test suite for aggregates, handling only non-nested struct params, at the moment;
Tassilo Philipp
parents:
diff changeset
48