Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Reindent everything (possibly breaking all branches, but for the last time)
[simgrid.git] / teshsuite / gras / datadesc / datadesc_structs.c
1 /* This file is perl-generated, of course */
2
3 #include "gras.h"
4
5 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(structs, test,
6                                 "Logs about the gigantic struct test");
7
8 #define READ  0
9 #define WRITE 1
10 #define RW    2
11
12 void write_read(const char *type, void *src, void *dst, gras_socket_t * sock,
13                 int direction);
14
15 GRAS_DEFINE_TYPE(cccc, struct cccc {
16                  char a; char b; char c; char d;};)
17
18   GRAS_DEFINE_TYPE(ccsc, struct ccsc {
19                    char a; char b; short int c; char d;};)
20
21   GRAS_DEFINE_TYPE(ccic, struct ccic {
22                    char a; char b; int c; char d;};)
23
24   GRAS_DEFINE_TYPE(cclc, struct cclc {
25                    char a; char b; long int c; char d;};)
26
27   GRAS_DEFINE_TYPE(ccLc, struct ccLc {
28                    char a; char b; long long int c; char d;};)
29
30   GRAS_DEFINE_TYPE(ccfc, struct ccfc {
31                    char a; char b; float c; char d;};)
32
33   GRAS_DEFINE_TYPE(ccdc, struct ccdc {
34                    char a; char b; double c; char d;};)
35
36   GRAS_DEFINE_TYPE(sccc, struct sccc {
37                    short int a; char b; char c; char d;};)
38
39   GRAS_DEFINE_TYPE(scsc, struct scsc {
40                    short int a; char b; short int c; char d;};)
41
42   GRAS_DEFINE_TYPE(scic, struct scic {
43                    short int a; char b; int c; char d;};)
44
45   GRAS_DEFINE_TYPE(sclc, struct sclc {
46                    short int a; char b; long int c; char d;};)
47
48   GRAS_DEFINE_TYPE(scLc, struct scLc {
49                    short int a; char b; long long int c; char d;};)
50
51   GRAS_DEFINE_TYPE(scfc, struct scfc {
52                    short int a; char b; float c; char d;};)
53
54   GRAS_DEFINE_TYPE(scdc, struct scdc {
55                    short int a; char b; double c; char d;};)
56
57   GRAS_DEFINE_TYPE(iccc, struct iccc {
58                    int a; char b; char c; char d;};)
59
60   GRAS_DEFINE_TYPE(icsc, struct icsc {
61                    int a; char b; short int c; char d;};)
62
63   GRAS_DEFINE_TYPE(icic, struct icic {
64                    int a; char b; int c; char d;};)
65
66   GRAS_DEFINE_TYPE(iclc, struct iclc {
67                    int a; char b; long int c; char d;};)
68
69   GRAS_DEFINE_TYPE(icLc, struct icLc {
70                    int a; char b; long long int c; char d;};)
71
72   GRAS_DEFINE_TYPE(icfc, struct icfc {
73                    int a; char b; float c; char d;};)
74
75   GRAS_DEFINE_TYPE(icdc, struct icdc {
76                    int a; char b; double c; char d;};)
77
78   GRAS_DEFINE_TYPE(lccc, struct lccc {
79                    long int a; char b; char c; char d;};)
80
81   GRAS_DEFINE_TYPE(lcsc, struct lcsc {
82                    long int a; char b; short int c; char d;};)
83
84   GRAS_DEFINE_TYPE(lcic, struct lcic {
85                    long int a; char b; int c; char d;};)
86
87   GRAS_DEFINE_TYPE(lclc, struct lclc {
88                    long int a; char b; long int c; char d;};)
89
90   GRAS_DEFINE_TYPE(lcLc, struct lcLc {
91                    long int a; char b; long long int c; char d;};)
92
93   GRAS_DEFINE_TYPE(lcfc, struct lcfc {
94                    long int a; char b; float c; char d;};)
95
96   GRAS_DEFINE_TYPE(lcdc, struct lcdc {
97                    long int a; char b; double c; char d;};)
98
99   GRAS_DEFINE_TYPE(Lccc, struct Lccc {
100                    long long int a; char b; char c; char d;};)
101
102   GRAS_DEFINE_TYPE(Lcsc, struct Lcsc {
103                    long long int a; char b; short int c; char d;};)
104
105   GRAS_DEFINE_TYPE(Lcic, struct Lcic {
106                    long long int a; char b; int c; char d;};)
107
108   GRAS_DEFINE_TYPE(Lclc, struct Lclc {
109                    long long int a; char b; long int c; char d;};)
110
111   GRAS_DEFINE_TYPE(LcLc, struct LcLc {
112                    long long int a; char b; long long int c; char d;};)
113
114   GRAS_DEFINE_TYPE(Lcfc, struct Lcfc {
115                    long long int a; char b; float c; char d;};)
116
117   GRAS_DEFINE_TYPE(Lcdc, struct Lcdc {
118                    long long int a; char b; double c; char d;};)
119
120   GRAS_DEFINE_TYPE(fccc, struct fccc {
121                    float a; char b; char c; char d;};)
122
123   GRAS_DEFINE_TYPE(fcsc, struct fcsc {
124                    float a; char b; short int c; char d;};)
125
126   GRAS_DEFINE_TYPE(fcic, struct fcic {
127                    float a; char b; int c; char d;};)
128
129   GRAS_DEFINE_TYPE(fclc, struct fclc {
130                    float a; char b; long int c; char d;};)
131
132   GRAS_DEFINE_TYPE(fcLc, struct fcLc {
133                    float a; char b; long long int c; char d;};)
134
135   GRAS_DEFINE_TYPE(fcfc, struct fcfc {
136                    float a; char b; float c; char d;};)
137
138   GRAS_DEFINE_TYPE(fcdc, struct fcdc {
139                    float a; char b; double c; char d;};)
140
141   GRAS_DEFINE_TYPE(dccc, struct dccc {
142                    double a; char b; char c; char d;};)
143
144   GRAS_DEFINE_TYPE(dcsc, struct dcsc {
145                    double a; char b; short int c; char d;};)
146
147   GRAS_DEFINE_TYPE(dcic, struct dcic {
148                    double a; char b; int c; char d;};)
149
150   GRAS_DEFINE_TYPE(dclc, struct dclc {
151                    double a; char b; long int c; char d;};)
152
153   GRAS_DEFINE_TYPE(dcLc, struct dcLc {
154                    double a; char b; long long int c; char d;};)
155
156   GRAS_DEFINE_TYPE(dcfc, struct dcfc {
157                    double a; char b; float c; char d;};)
158
159   GRAS_DEFINE_TYPE(dcdc, struct dcdc {
160                    double a; char b; double c; char d;};)
161
162 #define test(a) xbt_assert(a)
163      void register_structures(void);
164      void register_structures(void)
165 {
166   gras_msgtype_declare("cccc", gras_datadesc_by_symbol(cccc));
167   gras_msgtype_declare("ccsc", gras_datadesc_by_symbol(ccsc));
168   gras_msgtype_declare("ccic", gras_datadesc_by_symbol(ccic));
169   gras_msgtype_declare("cclc", gras_datadesc_by_symbol(cclc));
170   gras_msgtype_declare("ccLc", gras_datadesc_by_symbol(ccLc));
171   gras_msgtype_declare("ccfc", gras_datadesc_by_symbol(ccfc));
172   gras_msgtype_declare("ccdc", gras_datadesc_by_symbol(ccdc));
173   gras_msgtype_declare("sccc", gras_datadesc_by_symbol(sccc));
174   gras_msgtype_declare("scsc", gras_datadesc_by_symbol(scsc));
175   gras_msgtype_declare("scic", gras_datadesc_by_symbol(scic));
176   gras_msgtype_declare("sclc", gras_datadesc_by_symbol(sclc));
177   gras_msgtype_declare("scLc", gras_datadesc_by_symbol(scLc));
178   gras_msgtype_declare("scfc", gras_datadesc_by_symbol(scfc));
179   gras_msgtype_declare("scdc", gras_datadesc_by_symbol(scdc));
180   gras_msgtype_declare("iccc", gras_datadesc_by_symbol(iccc));
181   gras_msgtype_declare("icsc", gras_datadesc_by_symbol(icsc));
182   gras_msgtype_declare("icic", gras_datadesc_by_symbol(icic));
183   gras_msgtype_declare("iclc", gras_datadesc_by_symbol(iclc));
184   gras_msgtype_declare("icLc", gras_datadesc_by_symbol(icLc));
185   gras_msgtype_declare("icfc", gras_datadesc_by_symbol(icfc));
186   gras_msgtype_declare("icdc", gras_datadesc_by_symbol(icdc));
187   gras_msgtype_declare("lccc", gras_datadesc_by_symbol(lccc));
188   gras_msgtype_declare("lcsc", gras_datadesc_by_symbol(lcsc));
189   gras_msgtype_declare("lcic", gras_datadesc_by_symbol(lcic));
190   gras_msgtype_declare("lclc", gras_datadesc_by_symbol(lclc));
191   gras_msgtype_declare("lcLc", gras_datadesc_by_symbol(lcLc));
192   gras_msgtype_declare("lcfc", gras_datadesc_by_symbol(lcfc));
193   gras_msgtype_declare("lcdc", gras_datadesc_by_symbol(lcdc));
194   gras_msgtype_declare("Lccc", gras_datadesc_by_symbol(Lccc));
195   gras_msgtype_declare("Lcsc", gras_datadesc_by_symbol(Lcsc));
196   gras_msgtype_declare("Lcic", gras_datadesc_by_symbol(Lcic));
197   gras_msgtype_declare("Lclc", gras_datadesc_by_symbol(Lclc));
198   gras_msgtype_declare("LcLc", gras_datadesc_by_symbol(LcLc));
199   gras_msgtype_declare("Lcfc", gras_datadesc_by_symbol(Lcfc));
200   gras_msgtype_declare("Lcdc", gras_datadesc_by_symbol(Lcdc));
201   gras_msgtype_declare("fccc", gras_datadesc_by_symbol(fccc));
202   gras_msgtype_declare("fcsc", gras_datadesc_by_symbol(fcsc));
203   gras_msgtype_declare("fcic", gras_datadesc_by_symbol(fcic));
204   gras_msgtype_declare("fclc", gras_datadesc_by_symbol(fclc));
205   gras_msgtype_declare("fcLc", gras_datadesc_by_symbol(fcLc));
206   gras_msgtype_declare("fcfc", gras_datadesc_by_symbol(fcfc));
207   gras_msgtype_declare("fcdc", gras_datadesc_by_symbol(fcdc));
208   gras_msgtype_declare("dccc", gras_datadesc_by_symbol(dccc));
209   gras_msgtype_declare("dcsc", gras_datadesc_by_symbol(dcsc));
210   gras_msgtype_declare("dcic", gras_datadesc_by_symbol(dcic));
211   gras_msgtype_declare("dclc", gras_datadesc_by_symbol(dclc));
212   gras_msgtype_declare("dcLc", gras_datadesc_by_symbol(dcLc));
213   gras_msgtype_declare("dcfc", gras_datadesc_by_symbol(dcfc));
214   gras_msgtype_declare("dcdc", gras_datadesc_by_symbol(dcdc));
215 }
216
217 void test_structures(gras_socket_t * sock, int direction);
218 void test_structures(gras_socket_t * sock, int direction)
219 {
220   struct cccc my_cccc =
221     { 'w' + (char) 1, 'w' + (char) 2, 'w' + (char) 3, 'w' + (char) 4 },
222     my_cccc2;
223   struct ccsc my_ccsc =
224     { 'w' + (char) 1, 'w' + (char) 2, 134 + (short int) 3, 'w' + (char) 4 },
225     my_ccsc2;
226   struct ccic my_ccic =
227     { 'w' + (char) 1, 'w' + (char) 2, -11249 + (int) 3, 'w' + (char) 4 },
228     my_ccic2;
229   struct cclc my_cclc =
230     { 'w' + (char) 1, 'w' + (char) 2, 31319919 + (long int) 3,
231     'w' + (char) 4
232   }, my_cclc2;
233   struct ccLc my_ccLc =
234     { 'w' + (char) 1, 'w' + (char) 2, -232130010 + (long long int) 3,
235     'w' + (char) 4
236   }, my_ccLc2;
237   struct ccfc my_ccfc =
238     { 'w' + (char) 1, 'w' + (char) 2, -11313.1135 + (float) 3,
239     'w' + (char) 4
240   }, my_ccfc2;
241   struct ccdc my_ccdc =
242     { 'w' + (char) 1, 'w' + (char) 2, 1424420.11331 + (double) 3,
243     'w' + (char) 4
244   }, my_ccdc2;
245   struct sccc my_sccc =
246     { 134 + (short int) 1, 'w' + (char) 2, 'w' + (char) 3, 'w' + (char) 4 },
247     my_sccc2;
248   struct scsc my_scsc =
249     { 134 + (short int) 1, 'w' + (char) 2, 134 + (short int) 3,
250     'w' + (char) 4
251   }, my_scsc2;
252   struct scic my_scic =
253     { 134 + (short int) 1, 'w' + (char) 2, -11249 + (int) 3, 'w' + (char) 4 },
254     my_scic2;
255   struct sclc my_sclc =
256     { 134 + (short int) 1, 'w' + (char) 2, 31319919 + (long int) 3,
257     'w' + (char) 4
258   }, my_sclc2;
259   struct scLc my_scLc =
260     { 134 + (short int) 1, 'w' + (char) 2, -232130010 + (long long int) 3,
261     'w' + (char) 4
262   }, my_scLc2;
263   struct scfc my_scfc =
264     { 134 + (short int) 1, 'w' + (char) 2, -11313.1135 + (float) 3,
265     'w' + (char) 4
266   }, my_scfc2;
267   struct scdc my_scdc =
268     { 134 + (short int) 1, 'w' + (char) 2, 1424420.11331 + (double) 3,
269     'w' + (char) 4
270   }, my_scdc2;
271   struct iccc my_iccc =
272     { -11249 + (int) 1, 'w' + (char) 2, 'w' + (char) 3, 'w' + (char) 4 },
273     my_iccc2;
274   struct icsc my_icsc =
275     { -11249 + (int) 1, 'w' + (char) 2, 134 + (short int) 3, 'w' + (char) 4 },
276     my_icsc2;
277   struct icic my_icic =
278     { -11249 + (int) 1, 'w' + (char) 2, -11249 + (int) 3, 'w' + (char) 4 },
279     my_icic2;
280   struct iclc my_iclc =
281     { -11249 + (int) 1, 'w' + (char) 2, 31319919 + (long int) 3,
282     'w' + (char) 4
283   }, my_iclc2;
284   struct icLc my_icLc =
285     { -11249 + (int) 1, 'w' + (char) 2, -232130010 + (long long int) 3,
286     'w' + (char) 4
287   }, my_icLc2;
288   struct icfc my_icfc =
289     { -11249 + (int) 1, 'w' + (char) 2, -11313.1135 + (float) 3,
290     'w' + (char) 4
291   }, my_icfc2;
292   struct icdc my_icdc =
293     { -11249 + (int) 1, 'w' + (char) 2, 1424420.11331 + (double) 3,
294     'w' + (char) 4
295   }, my_icdc2;
296   struct lccc my_lccc =
297     { 31319919 + (long int) 1, 'w' + (char) 2, 'w' + (char) 3,
298     'w' + (char) 4
299   }, my_lccc2;
300   struct lcsc my_lcsc =
301     { 31319919 + (long int) 1, 'w' + (char) 2, 134 + (short int) 3,
302     'w' + (char) 4
303   }, my_lcsc2;
304   struct lcic my_lcic =
305     { 31319919 + (long int) 1, 'w' + (char) 2, -11249 + (int) 3,
306     'w' + (char) 4
307   }, my_lcic2;
308   struct lclc my_lclc =
309     { 31319919 + (long int) 1, 'w' + (char) 2, 31319919 + (long int) 3,
310     'w' + (char) 4
311   }, my_lclc2;
312   struct lcLc my_lcLc =
313     { 31319919 + (long int) 1, 'w' + (char) 2, -232130010 + (long long int) 3,
314     'w' + (char) 4
315   }, my_lcLc2;
316   struct lcfc my_lcfc =
317     { 31319919 + (long int) 1, 'w' + (char) 2, -11313.1135 + (float) 3,
318     'w' + (char) 4
319   }, my_lcfc2;
320   struct lcdc my_lcdc =
321     { 31319919 + (long int) 1, 'w' + (char) 2, 1424420.11331 + (double) 3,
322     'w' + (char) 4
323   }, my_lcdc2;
324   struct Lccc my_Lccc =
325     { -232130010 + (long long int) 1, 'w' + (char) 2, 'w' + (char) 3,
326     'w' + (char) 4
327   }, my_Lccc2;
328   struct Lcsc my_Lcsc =
329     { -232130010 + (long long int) 1, 'w' + (char) 2, 134 + (short int) 3,
330     'w' + (char) 4
331   }, my_Lcsc2;
332   struct Lcic my_Lcic =
333     { -232130010 + (long long int) 1, 'w' + (char) 2, -11249 + (int) 3,
334     'w' + (char) 4
335   }, my_Lcic2;
336   struct Lclc my_Lclc =
337     { -232130010 + (long long int) 1, 'w' + (char) 2, 31319919 + (long int) 3,
338     'w' + (char) 4
339   }, my_Lclc2;
340   struct LcLc my_LcLc = { -232130010 + (long long int) 1, 'w' + (char) 2,
341     -232130010 + (long long int) 3, 'w' + (char) 4
342   }, my_LcLc2;
343   struct Lcfc my_Lcfc =
344     { -232130010 + (long long int) 1, 'w' + (char) 2, -11313.1135 + (float) 3,
345     'w' + (char) 4
346   }, my_Lcfc2;
347   struct Lcdc my_Lcdc = { -232130010 + (long long int) 1, 'w' + (char) 2,
348     1424420.11331 + (double) 3, 'w' + (char) 4
349   }, my_Lcdc2;
350   struct fccc my_fccc =
351     { -11313.1135 + (float) 1, 'w' + (char) 2, 'w' + (char) 3,
352     'w' + (char) 4
353   }, my_fccc2;
354   struct fcsc my_fcsc =
355     { -11313.1135 + (float) 1, 'w' + (char) 2, 134 + (short int) 3,
356     'w' + (char) 4
357   }, my_fcsc2;
358   struct fcic my_fcic =
359     { -11313.1135 + (float) 1, 'w' + (char) 2, -11249 + (int) 3,
360     'w' + (char) 4
361   }, my_fcic2;
362   struct fclc my_fclc =
363     { -11313.1135 + (float) 1, 'w' + (char) 2, 31319919 + (long int) 3,
364     'w' + (char) 4
365   }, my_fclc2;
366   struct fcLc my_fcLc =
367     { -11313.1135 + (float) 1, 'w' + (char) 2, -232130010 + (long long int) 3,
368     'w' + (char) 4
369   }, my_fcLc2;
370   struct fcfc my_fcfc =
371     { -11313.1135 + (float) 1, 'w' + (char) 2, -11313.1135 + (float) 3,
372     'w' + (char) 4
373   }, my_fcfc2;
374   struct fcdc my_fcdc =
375     { -11313.1135 + (float) 1, 'w' + (char) 2, 1424420.11331 + (double) 3,
376     'w' + (char) 4
377   }, my_fcdc2;
378   struct dccc my_dccc =
379     { 1424420.11331 + (double) 1, 'w' + (char) 2, 'w' + (char) 3,
380     'w' + (char) 4
381   }, my_dccc2;
382   struct dcsc my_dcsc =
383     { 1424420.11331 + (double) 1, 'w' + (char) 2, 134 + (short int) 3,
384     'w' + (char) 4
385   }, my_dcsc2;
386   struct dcic my_dcic =
387     { 1424420.11331 + (double) 1, 'w' + (char) 2, -11249 + (int) 3,
388     'w' + (char) 4
389   }, my_dcic2;
390   struct dclc my_dclc =
391     { 1424420.11331 + (double) 1, 'w' + (char) 2, 31319919 + (long int) 3,
392     'w' + (char) 4
393   }, my_dclc2;
394   struct dcLc my_dcLc = { 1424420.11331 + (double) 1, 'w' + (char) 2,
395     -232130010 + (long long int) 3, 'w' + (char) 4
396   }, my_dcLc2;
397   struct dcfc my_dcfc =
398     { 1424420.11331 + (double) 1, 'w' + (char) 2, -11313.1135 + (float) 3,
399     'w' + (char) 4
400   }, my_dcfc2;
401   struct dcdc my_dcdc =
402     { 1424420.11331 + (double) 1, 'w' + (char) 2, 1424420.11331 + (double) 3,
403     'w' + (char) 4
404   }, my_dcdc2;
405   INFO0("---- Test on all possible struct having 3 fields (49 structs) ----");
406   write_read("cccc", &my_cccc, &my_cccc2, sock, direction);
407   if (direction == READ || direction == RW) {
408     int failed = 0;
409     test(my_cccc.a == my_cccc2.a);
410     test(my_cccc.b == my_cccc2.b);
411     test(my_cccc.c == my_cccc2.c);
412     test(my_cccc.d == my_cccc2.d);
413     if (!failed)
414       VERB0("Passed cccc");
415   }
416   write_read("ccsc", &my_ccsc, &my_ccsc2, sock, direction);
417   if (direction == READ || direction == RW) {
418     int failed = 0;
419     test(my_ccsc.a == my_ccsc2.a);
420     test(my_ccsc.b == my_ccsc2.b);
421     test(my_ccsc.c == my_ccsc2.c);
422     test(my_ccsc.d == my_ccsc2.d);
423     if (!failed)
424       VERB0("Passed ccsc");
425   }
426   write_read("ccic", &my_ccic, &my_ccic2, sock, direction);
427   if (direction == READ || direction == RW) {
428     int failed = 0;
429     test(my_ccic.a == my_ccic2.a);
430     test(my_ccic.b == my_ccic2.b);
431     test(my_ccic.c == my_ccic2.c);
432     test(my_ccic.d == my_ccic2.d);
433     if (!failed)
434       VERB0("Passed ccic");
435   }
436   write_read("cclc", &my_cclc, &my_cclc2, sock, direction);
437   if (direction == READ || direction == RW) {
438     int failed = 0;
439     test(my_cclc.a == my_cclc2.a);
440     test(my_cclc.b == my_cclc2.b);
441     test(my_cclc.c == my_cclc2.c);
442     test(my_cclc.d == my_cclc2.d);
443     if (!failed)
444       VERB0("Passed cclc");
445   }
446   write_read("ccLc", &my_ccLc, &my_ccLc2, sock, direction);
447   if (direction == READ || direction == RW) {
448     int failed = 0;
449     test(my_ccLc.a == my_ccLc2.a);
450     test(my_ccLc.b == my_ccLc2.b);
451     test(my_ccLc.c == my_ccLc2.c);
452     test(my_ccLc.d == my_ccLc2.d);
453     if (!failed)
454       VERB0("Passed ccLc");
455   }
456   write_read("ccfc", &my_ccfc, &my_ccfc2, sock, direction);
457   if (direction == READ || direction == RW) {
458     int failed = 0;
459     test(my_ccfc.a == my_ccfc2.a);
460     test(my_ccfc.b == my_ccfc2.b);
461     test(my_ccfc.c == my_ccfc2.c);
462     test(my_ccfc.d == my_ccfc2.d);
463     if (!failed)
464       VERB0("Passed ccfc");
465   }
466   write_read("ccdc", &my_ccdc, &my_ccdc2, sock, direction);
467   if (direction == READ || direction == RW) {
468     int failed = 0;
469     test(my_ccdc.a == my_ccdc2.a);
470     test(my_ccdc.b == my_ccdc2.b);
471     test(my_ccdc.c == my_ccdc2.c);
472     test(my_ccdc.d == my_ccdc2.d);
473     if (!failed)
474       VERB0("Passed ccdc");
475   }
476   write_read("sccc", &my_sccc, &my_sccc2, sock, direction);
477   if (direction == READ || direction == RW) {
478     int failed = 0;
479     test(my_sccc.a == my_sccc2.a);
480     test(my_sccc.b == my_sccc2.b);
481     test(my_sccc.c == my_sccc2.c);
482     test(my_sccc.d == my_sccc2.d);
483     if (!failed)
484       VERB0("Passed sccc");
485   }
486   write_read("scsc", &my_scsc, &my_scsc2, sock, direction);
487   if (direction == READ || direction == RW) {
488     int failed = 0;
489     test(my_scsc.a == my_scsc2.a);
490     test(my_scsc.b == my_scsc2.b);
491     test(my_scsc.c == my_scsc2.c);
492     test(my_scsc.d == my_scsc2.d);
493     if (!failed)
494       VERB0("Passed scsc");
495   }
496   write_read("scic", &my_scic, &my_scic2, sock, direction);
497   if (direction == READ || direction == RW) {
498     int failed = 0;
499     test(my_scic.a == my_scic2.a);
500     test(my_scic.b == my_scic2.b);
501     test(my_scic.c == my_scic2.c);
502     test(my_scic.d == my_scic2.d);
503     if (!failed)
504       VERB0("Passed scic");
505   }
506   write_read("sclc", &my_sclc, &my_sclc2, sock, direction);
507   if (direction == READ || direction == RW) {
508     int failed = 0;
509     test(my_sclc.a == my_sclc2.a);
510     test(my_sclc.b == my_sclc2.b);
511     test(my_sclc.c == my_sclc2.c);
512     test(my_sclc.d == my_sclc2.d);
513     if (!failed)
514       VERB0("Passed sclc");
515   }
516   write_read("scLc", &my_scLc, &my_scLc2, sock, direction);
517   if (direction == READ || direction == RW) {
518     int failed = 0;
519     test(my_scLc.a == my_scLc2.a);
520     test(my_scLc.b == my_scLc2.b);
521     test(my_scLc.c == my_scLc2.c);
522     test(my_scLc.d == my_scLc2.d);
523     if (!failed)
524       VERB0("Passed scLc");
525   }
526   write_read("scfc", &my_scfc, &my_scfc2, sock, direction);
527   if (direction == READ || direction == RW) {
528     int failed = 0;
529     test(my_scfc.a == my_scfc2.a);
530     test(my_scfc.b == my_scfc2.b);
531     test(my_scfc.c == my_scfc2.c);
532     test(my_scfc.d == my_scfc2.d);
533     if (!failed)
534       VERB0("Passed scfc");
535   }
536   write_read("scdc", &my_scdc, &my_scdc2, sock, direction);
537   if (direction == READ || direction == RW) {
538     int failed = 0;
539     test(my_scdc.a == my_scdc2.a);
540     test(my_scdc.b == my_scdc2.b);
541     test(my_scdc.c == my_scdc2.c);
542     test(my_scdc.d == my_scdc2.d);
543     if (!failed)
544       VERB0("Passed scdc");
545   }
546   write_read("iccc", &my_iccc, &my_iccc2, sock, direction);
547   if (direction == READ || direction == RW) {
548     int failed = 0;
549     test(my_iccc.a == my_iccc2.a);
550     test(my_iccc.b == my_iccc2.b);
551     test(my_iccc.c == my_iccc2.c);
552     test(my_iccc.d == my_iccc2.d);
553     if (!failed)
554       VERB0("Passed iccc");
555   }
556   write_read("icsc", &my_icsc, &my_icsc2, sock, direction);
557   if (direction == READ || direction == RW) {
558     int failed = 0;
559     test(my_icsc.a == my_icsc2.a);
560     test(my_icsc.b == my_icsc2.b);
561     test(my_icsc.c == my_icsc2.c);
562     test(my_icsc.d == my_icsc2.d);
563     if (!failed)
564       VERB0("Passed icsc");
565   }
566   write_read("icic", &my_icic, &my_icic2, sock, direction);
567   if (direction == READ || direction == RW) {
568     int failed = 0;
569     test(my_icic.a == my_icic2.a);
570     test(my_icic.b == my_icic2.b);
571     test(my_icic.c == my_icic2.c);
572     test(my_icic.d == my_icic2.d);
573     if (!failed)
574       VERB0("Passed icic");
575   }
576   write_read("iclc", &my_iclc, &my_iclc2, sock, direction);
577   if (direction == READ || direction == RW) {
578     int failed = 0;
579     test(my_iclc.a == my_iclc2.a);
580     test(my_iclc.b == my_iclc2.b);
581     test(my_iclc.c == my_iclc2.c);
582     test(my_iclc.d == my_iclc2.d);
583     if (!failed)
584       VERB0("Passed iclc");
585   }
586   write_read("icLc", &my_icLc, &my_icLc2, sock, direction);
587   if (direction == READ || direction == RW) {
588     int failed = 0;
589     test(my_icLc.a == my_icLc2.a);
590     test(my_icLc.b == my_icLc2.b);
591     test(my_icLc.c == my_icLc2.c);
592     test(my_icLc.d == my_icLc2.d);
593     if (!failed)
594       VERB0("Passed icLc");
595   }
596   write_read("icfc", &my_icfc, &my_icfc2, sock, direction);
597   if (direction == READ || direction == RW) {
598     int failed = 0;
599     test(my_icfc.a == my_icfc2.a);
600     test(my_icfc.b == my_icfc2.b);
601     test(my_icfc.c == my_icfc2.c);
602     test(my_icfc.d == my_icfc2.d);
603     if (!failed)
604       VERB0("Passed icfc");
605   }
606   write_read("icdc", &my_icdc, &my_icdc2, sock, direction);
607   if (direction == READ || direction == RW) {
608     int failed = 0;
609     test(my_icdc.a == my_icdc2.a);
610     test(my_icdc.b == my_icdc2.b);
611     test(my_icdc.c == my_icdc2.c);
612     test(my_icdc.d == my_icdc2.d);
613     if (!failed)
614       VERB0("Passed icdc");
615   }
616   write_read("lccc", &my_lccc, &my_lccc2, sock, direction);
617   if (direction == READ || direction == RW) {
618     int failed = 0;
619     test(my_lccc.a == my_lccc2.a);
620     test(my_lccc.b == my_lccc2.b);
621     test(my_lccc.c == my_lccc2.c);
622     test(my_lccc.d == my_lccc2.d);
623     if (!failed)
624       VERB0("Passed lccc");
625   }
626   write_read("lcsc", &my_lcsc, &my_lcsc2, sock, direction);
627   if (direction == READ || direction == RW) {
628     int failed = 0;
629     test(my_lcsc.a == my_lcsc2.a);
630     test(my_lcsc.b == my_lcsc2.b);
631     test(my_lcsc.c == my_lcsc2.c);
632     test(my_lcsc.d == my_lcsc2.d);
633     if (!failed)
634       VERB0("Passed lcsc");
635   }
636   write_read("lcic", &my_lcic, &my_lcic2, sock, direction);
637   if (direction == READ || direction == RW) {
638     int failed = 0;
639     test(my_lcic.a == my_lcic2.a);
640     test(my_lcic.b == my_lcic2.b);
641     test(my_lcic.c == my_lcic2.c);
642     test(my_lcic.d == my_lcic2.d);
643     if (!failed)
644       VERB0("Passed lcic");
645   }
646   write_read("lclc", &my_lclc, &my_lclc2, sock, direction);
647   if (direction == READ || direction == RW) {
648     int failed = 0;
649     test(my_lclc.a == my_lclc2.a);
650     test(my_lclc.b == my_lclc2.b);
651     test(my_lclc.c == my_lclc2.c);
652     test(my_lclc.d == my_lclc2.d);
653     if (!failed)
654       VERB0("Passed lclc");
655   }
656   write_read("lcLc", &my_lcLc, &my_lcLc2, sock, direction);
657   if (direction == READ || direction == RW) {
658     int failed = 0;
659     test(my_lcLc.a == my_lcLc2.a);
660     test(my_lcLc.b == my_lcLc2.b);
661     test(my_lcLc.c == my_lcLc2.c);
662     test(my_lcLc.d == my_lcLc2.d);
663     if (!failed)
664       VERB0("Passed lcLc");
665   }
666   write_read("lcfc", &my_lcfc, &my_lcfc2, sock, direction);
667   if (direction == READ || direction == RW) {
668     int failed = 0;
669     test(my_lcfc.a == my_lcfc2.a);
670     test(my_lcfc.b == my_lcfc2.b);
671     test(my_lcfc.c == my_lcfc2.c);
672     test(my_lcfc.d == my_lcfc2.d);
673     if (!failed)
674       VERB0("Passed lcfc");
675   }
676   write_read("lcdc", &my_lcdc, &my_lcdc2, sock, direction);
677   if (direction == READ || direction == RW) {
678     int failed = 0;
679     test(my_lcdc.a == my_lcdc2.a);
680     test(my_lcdc.b == my_lcdc2.b);
681     test(my_lcdc.c == my_lcdc2.c);
682     test(my_lcdc.d == my_lcdc2.d);
683     if (!failed)
684       VERB0("Passed lcdc");
685   }
686   write_read("Lccc", &my_Lccc, &my_Lccc2, sock, direction);
687   if (direction == READ || direction == RW) {
688     int failed = 0;
689     test(my_Lccc.a == my_Lccc2.a);
690     test(my_Lccc.b == my_Lccc2.b);
691     test(my_Lccc.c == my_Lccc2.c);
692     test(my_Lccc.d == my_Lccc2.d);
693     if (!failed)
694       VERB0("Passed Lccc");
695   }
696   write_read("Lcsc", &my_Lcsc, &my_Lcsc2, sock, direction);
697   if (direction == READ || direction == RW) {
698     int failed = 0;
699     test(my_Lcsc.a == my_Lcsc2.a);
700     test(my_Lcsc.b == my_Lcsc2.b);
701     test(my_Lcsc.c == my_Lcsc2.c);
702     test(my_Lcsc.d == my_Lcsc2.d);
703     if (!failed)
704       VERB0("Passed Lcsc");
705   }
706   write_read("Lcic", &my_Lcic, &my_Lcic2, sock, direction);
707   if (direction == READ || direction == RW) {
708     int failed = 0;
709     test(my_Lcic.a == my_Lcic2.a);
710     test(my_Lcic.b == my_Lcic2.b);
711     test(my_Lcic.c == my_Lcic2.c);
712     test(my_Lcic.d == my_Lcic2.d);
713     if (!failed)
714       VERB0("Passed Lcic");
715   }
716   write_read("Lclc", &my_Lclc, &my_Lclc2, sock, direction);
717   if (direction == READ || direction == RW) {
718     int failed = 0;
719     test(my_Lclc.a == my_Lclc2.a);
720     test(my_Lclc.b == my_Lclc2.b);
721     test(my_Lclc.c == my_Lclc2.c);
722     test(my_Lclc.d == my_Lclc2.d);
723     if (!failed)
724       VERB0("Passed Lclc");
725   }
726   write_read("LcLc", &my_LcLc, &my_LcLc2, sock, direction);
727   if (direction == READ || direction == RW) {
728     int failed = 0;
729     test(my_LcLc.a == my_LcLc2.a);
730     test(my_LcLc.b == my_LcLc2.b);
731     test(my_LcLc.c == my_LcLc2.c);
732     test(my_LcLc.d == my_LcLc2.d);
733     if (!failed)
734       VERB0("Passed LcLc");
735   }
736   write_read("Lcfc", &my_Lcfc, &my_Lcfc2, sock, direction);
737   if (direction == READ || direction == RW) {
738     int failed = 0;
739     test(my_Lcfc.a == my_Lcfc2.a);
740     test(my_Lcfc.b == my_Lcfc2.b);
741     test(my_Lcfc.c == my_Lcfc2.c);
742     test(my_Lcfc.d == my_Lcfc2.d);
743     if (!failed)
744       VERB0("Passed Lcfc");
745   }
746   write_read("Lcdc", &my_Lcdc, &my_Lcdc2, sock, direction);
747   if (direction == READ || direction == RW) {
748     int failed = 0;
749     test(my_Lcdc.a == my_Lcdc2.a);
750     test(my_Lcdc.b == my_Lcdc2.b);
751     test(my_Lcdc.c == my_Lcdc2.c);
752     test(my_Lcdc.d == my_Lcdc2.d);
753     if (!failed)
754       VERB0("Passed Lcdc");
755   }
756   write_read("fccc", &my_fccc, &my_fccc2, sock, direction);
757   if (direction == READ || direction == RW) {
758     int failed = 0;
759     test(my_fccc.a == my_fccc2.a);
760     test(my_fccc.b == my_fccc2.b);
761     test(my_fccc.c == my_fccc2.c);
762     test(my_fccc.d == my_fccc2.d);
763     if (!failed)
764       VERB0("Passed fccc");
765   }
766   write_read("fcsc", &my_fcsc, &my_fcsc2, sock, direction);
767   if (direction == READ || direction == RW) {
768     int failed = 0;
769     test(my_fcsc.a == my_fcsc2.a);
770     test(my_fcsc.b == my_fcsc2.b);
771     test(my_fcsc.c == my_fcsc2.c);
772     test(my_fcsc.d == my_fcsc2.d);
773     if (!failed)
774       VERB0("Passed fcsc");
775   }
776   write_read("fcic", &my_fcic, &my_fcic2, sock, direction);
777   if (direction == READ || direction == RW) {
778     int failed = 0;
779     test(my_fcic.a == my_fcic2.a);
780     test(my_fcic.b == my_fcic2.b);
781     test(my_fcic.c == my_fcic2.c);
782     test(my_fcic.d == my_fcic2.d);
783     if (!failed)
784       VERB0("Passed fcic");
785   }
786   write_read("fclc", &my_fclc, &my_fclc2, sock, direction);
787   if (direction == READ || direction == RW) {
788     int failed = 0;
789     test(my_fclc.a == my_fclc2.a);
790     test(my_fclc.b == my_fclc2.b);
791     test(my_fclc.c == my_fclc2.c);
792     test(my_fclc.d == my_fclc2.d);
793     if (!failed)
794       VERB0("Passed fclc");
795   }
796   write_read("fcLc", &my_fcLc, &my_fcLc2, sock, direction);
797   if (direction == READ || direction == RW) {
798     int failed = 0;
799     test(my_fcLc.a == my_fcLc2.a);
800     test(my_fcLc.b == my_fcLc2.b);
801     test(my_fcLc.c == my_fcLc2.c);
802     test(my_fcLc.d == my_fcLc2.d);
803     if (!failed)
804       VERB0("Passed fcLc");
805   }
806   write_read("fcfc", &my_fcfc, &my_fcfc2, sock, direction);
807   if (direction == READ || direction == RW) {
808     int failed = 0;
809     test(my_fcfc.a == my_fcfc2.a);
810     test(my_fcfc.b == my_fcfc2.b);
811     test(my_fcfc.c == my_fcfc2.c);
812     test(my_fcfc.d == my_fcfc2.d);
813     if (!failed)
814       VERB0("Passed fcfc");
815   }
816   write_read("fcdc", &my_fcdc, &my_fcdc2, sock, direction);
817   if (direction == READ || direction == RW) {
818     int failed = 0;
819     test(my_fcdc.a == my_fcdc2.a);
820     test(my_fcdc.b == my_fcdc2.b);
821     test(my_fcdc.c == my_fcdc2.c);
822     test(my_fcdc.d == my_fcdc2.d);
823     if (!failed)
824       VERB0("Passed fcdc");
825   }
826   write_read("dccc", &my_dccc, &my_dccc2, sock, direction);
827   if (direction == READ || direction == RW) {
828     int failed = 0;
829     test(my_dccc.a == my_dccc2.a);
830     test(my_dccc.b == my_dccc2.b);
831     test(my_dccc.c == my_dccc2.c);
832     test(my_dccc.d == my_dccc2.d);
833     if (!failed)
834       VERB0("Passed dccc");
835   }
836   write_read("dcsc", &my_dcsc, &my_dcsc2, sock, direction);
837   if (direction == READ || direction == RW) {
838     int failed = 0;
839     test(my_dcsc.a == my_dcsc2.a);
840     test(my_dcsc.b == my_dcsc2.b);
841     test(my_dcsc.c == my_dcsc2.c);
842     test(my_dcsc.d == my_dcsc2.d);
843     if (!failed)
844       VERB0("Passed dcsc");
845   }
846   write_read("dcic", &my_dcic, &my_dcic2, sock, direction);
847   if (direction == READ || direction == RW) {
848     int failed = 0;
849     test(my_dcic.a == my_dcic2.a);
850     test(my_dcic.b == my_dcic2.b);
851     test(my_dcic.c == my_dcic2.c);
852     test(my_dcic.d == my_dcic2.d);
853     if (!failed)
854       VERB0("Passed dcic");
855   }
856   write_read("dclc", &my_dclc, &my_dclc2, sock, direction);
857   if (direction == READ || direction == RW) {
858     int failed = 0;
859     test(my_dclc.a == my_dclc2.a);
860     test(my_dclc.b == my_dclc2.b);
861     test(my_dclc.c == my_dclc2.c);
862     test(my_dclc.d == my_dclc2.d);
863     if (!failed)
864       VERB0("Passed dclc");
865   }
866   write_read("dcLc", &my_dcLc, &my_dcLc2, sock, direction);
867   if (direction == READ || direction == RW) {
868     int failed = 0;
869     test(my_dcLc.a == my_dcLc2.a);
870     test(my_dcLc.b == my_dcLc2.b);
871     test(my_dcLc.c == my_dcLc2.c);
872     test(my_dcLc.d == my_dcLc2.d);
873     if (!failed)
874       VERB0("Passed dcLc");
875   }
876   write_read("dcfc", &my_dcfc, &my_dcfc2, sock, direction);
877   if (direction == READ || direction == RW) {
878     int failed = 0;
879     test(my_dcfc.a == my_dcfc2.a);
880     test(my_dcfc.b == my_dcfc2.b);
881     test(my_dcfc.c == my_dcfc2.c);
882     test(my_dcfc.d == my_dcfc2.d);
883     if (!failed)
884       VERB0("Passed dcfc");
885   }
886   write_read("dcdc", &my_dcdc, &my_dcdc2, sock, direction);
887   if (direction == READ || direction == RW) {
888     int failed = 0;
889     test(my_dcdc.a == my_dcdc2.a);
890     test(my_dcdc.b == my_dcdc2.b);
891     test(my_dcdc.c == my_dcdc2.c);
892     test(my_dcdc.d == my_dcdc2.d);
893     if (!failed)
894       VERB0("Passed dcdc");
895   }
896 }