Logo AND Algorithmique Numérique Distribuée

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