source: tests/array-collections/boxed.cases.hfa@ 090b076

Last change on this file since 090b076 was fd4df379, checked in by Michael Brooks <mlbrooks@…>, 14 months ago

Implement boxing for arrays.

The added test is things that did not work before.

  • Property mode set to 100644
File size: 7.0 KB
Line 
1//
2// Cforall Version 1.0.0 Copyright (C) 2023 University of Waterloo
3//
4// The contents of this file are covered under the licence agreement in the
5// file "LICENCE" distributed with Cforall.
6//
7// boxed.cases.hfa -- tables of test cases for the "array boxed" test
8//
9// Author : Mike Brooks
10// Created On : Thu Jul 25 17:00:00 2024
11// Last Modified By :
12// Last Modified On :
13// Update Count :
14//
15
16// See general test documentation in boxed.main.cfa.
17
18/*
19This pair of tables summarizes the handwritten functions of .main.cfa, for automatically wrapping and calling them.
20
21TR test rig one handwritten function and its stack of generated wrappers
22- TRID test rig identifier (primary key)
23- SZS sizing style how the array's length (in number of elements) is given
24 - NSTAT static number of elements generated code hardcodes the array length; the outputted C VLA accommodates only varying-sized T
25 - NDYN dynamic number of elements generated code uses a parameter for the length; represents a VLA apparent to the CFA programmer
26- SZV sizing value concrete size of the test case, except for (TR, NDYN), which has the parameter name
27- ETG element type generator how the array's element type relates to T
28 - ID identity array is of T
29 - PAIR pair array is of pair(T,T)
30- ACCS access style how the access-side code sees the elements
31 - BUF buffer accessor is working directly with the declared array (buffer) variable
32 - RAII RAII accessor is a constructor/destructor pair
33 - PFST pointer to first element accessor is in a support function, who receives the array as parameter T x[]
34 - PARR pointer to array accessor is in a support function, who receives the array as parameter T (*x)[length]
35- SPS support polymorphism style when passing the array to a support (helper) function, how the call uses type variables and assertions
36 - NA not applicable the rig does not use a support function
37 - PPD poly-poly direct polymorphic calls polymorphic, directly (C-style name lookup)
38 - PPA poly-poly assertion polymorphic calls polymorphic, via assertion
39 - PMA poly-mono assertion polymorphic calls monomorphic, via assertion
40 - MPD mono-poly direct monomorphic calls polymorphic, directly (C-style name lookup)
41- OVLD overloading type type of pointer returned from the function (wrapper), lets caller
42TC test case one call to (the stack of wrappers of) a handwritten function
43- TRID test rig identifier (primary key, pseudo foreign key)
44- TCID test case identifier (primary key)
45- SZS sizing style (duplicate, join result)
46- SZV sizing value (duplicate, join result), except for TC under TR NDYN, which has concrete size of the test case
47- ETG element type generator (duplicate, join result)
48- VART varying type type to use for T in this call
49*/
50
51// #define TR( TRID, SZS, SZV, ETG, ACCS, SPS, OVLD )
52// #define TC( TRID, TCID, SZS, SZV, ETG, VART )
53
54 TR( 1, NSTAT, 1, ID, BUF, NA, T )
55 TC( 1, a, NSTAT, 1, ID, short )
56 TC( 1, b, NSTAT, 1, ID, bigun )
57
58 TR( 2, NSTAT, 42, ID, BUF, NA, T )
59 TC( 2, a, NSTAT, 42, ID, char )
60 TC( 2, b, NSTAT, 42, ID, float )
61 TC( 2, c, NSTAT, 42, ID, long long )
62 TC( 2, d, NSTAT, 42, ID, bigun )
63
64 TR( 3, NDYN, n, ID, BUF, NA, T )
65 TC( 3, a, NDYN, 1, ID, int )
66 TC( 3, b, NDYN, 42, ID, int )
67 TC( 3, c, NDYN, 1, ID, bigun )
68 TC( 3, d, NDYN, 42, ID, bigun )
69
70 TR( 4, NSTAT, 42, ID, BUF, NA, T )
71 TC( 4, a, NSTAT, 42, ID, char )
72 TC( 4, b, NSTAT, 42, ID, bigun )
73
74 TR( 5, NSTAT, 42, PAIR, BUF, NA, T )
75 TC( 5, a, NSTAT, 42, PAIR, double )
76 TC( 5, b, NSTAT, 42, PAIR, bigun )
77
78 TR( 6, NSTAT, 42, ID, RAII, NA, T )
79 TC( 6, a, NSTAT, 42, ID, my_mgd_t )
80
81 TR( 7, NSTAT, 42, ID, PFST, PPD, T )
82 TC( 7, a, NSTAT, 42, ID, char )
83 TC( 7, b, NSTAT, 42, ID, float )
84 TC( 7, c, NSTAT, 42, ID, long long )
85 TC( 7, d, NSTAT, 42, ID, bigun )
86
87 TR( 8, NSTAT, 42, ID, PARR, PPD, T )
88 TC( 8, a, NSTAT, 42, ID, double )
89
90 TR( 9, NSTAT, 42, ID, PFST, PPA, T )
91 TC( 9, a, NSTAT, 42, ID, char )
92 TC( 9, b, NSTAT, 42, ID, float )
93 TC( 9, c, NSTAT, 42, ID, long long )
94 TC( 9, d, NSTAT, 42, ID, bigun )
95
96 TR( 10, NSTAT, 42, ID, PARR, PPA, T )
97 TC( 10, a, NSTAT, 42, ID, double )
98
99 TR( 11, NSTAT, 42, ID, PFST, PMA, T )
100 TC( 11, a, NSTAT, 42, ID, char )
101 TC( 11, b, NSTAT, 42, ID, bigun )
102
103 TR( 12, NSTAT, 42, ID, PARR, PMA, T )
104 TC( 12, a, NSTAT, 42, ID, double )
105
106 TR( 13, NSTAT, 42, ID, PFST, MPD, char ) // overload 1
107 TR( 13, NSTAT, 42, ID, PFST, MPD, bigun ) // overload 2
108 TC( 13, a, NSTAT, 42, ID, char )
109 TC( 13, b, NSTAT, 42, ID, bigun )
110
111 TR( 14, NSTAT, 42, ID, PARR, MPD, double )
112 TC( 14, a, NSTAT, 42, ID, double )
113
114 TR( 15, NSTAT, 42, ID, PFST, PPD, T )
115 TC( 15, a, NSTAT, 42, ID, char )
116 TC( 15, b, NSTAT, 42, ID, bigun )
Note: See TracBrowser for help on using the repository browser.