Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
ONGOING work on exceptions plus minor cleanups.
[simgrid.git] / testsuite / gras / mk_datadesc_structs.pl
index fb842f4..a9b520a 100755 (executable)
@@ -49,9 +49,8 @@ for $i (0..$max_i) { for $j (0..$max_j) { for $k (0..$max_k) { for $l (0..$max_l
 # print "\n#define test(a) do {if (!(a)) { failed = 1; ERROR1(\"%s failed\",#a);}} while (0)\n";
  print "\n#define test(a) xbt_assert(a)\n";
 
-print "\nxbt_error_t test_structures(gras_socket_t *sock, int direction);\n";
-print "\nxbt_error_t test_structures(gras_socket_t *sock, int direction) {\n";
-print "  xbt_error_t errcode;\n";
+print "void test_structures(gras_socket_t *sock, int direction);\n";
+print "void test_structures(gras_socket_t *sock, int direction) {\n";
 for $i (0..$max_i) { for $j (0..$max_j) { for $k (0..$max_k) { for $l (0..$max_l) {
     my $struct=$abrev[$i].$abrev[$j].$abrev[$k].$abrev[$l];
     print "  struct $struct my_$struct = {".$val[$i]."+(".$types[$i].")1,"
@@ -63,7 +62,7 @@ for $i (0..$max_i) { for $j (0..$max_j) { for $k (0..$max_k) { for $l (0..$max_l
 print "  INFO0(\"---- Test on all possible struct having 3 fields (".(($max_i+1)*($max_j+1)*($max_k+1)*($max_l+1))." structs) ----\");\n";
 for $i (0..$max_i) { for $j (0..$max_j) { for $k (0..$max_k) { for $l (0..$max_l) {
     my $struct=$abrev[$i].$abrev[$j].$abrev[$k].$abrev[$l];
-    print "  TRYOLD(write_read(gras_datadesc_by_symbol($struct), &my_$struct, &my_${struct}2, sock,direction));\n";
+    print "  write_read(gras_datadesc_by_symbol($struct), &my_$struct, &my_${struct}2, sock,direction);\n";
     print "  if (direction == READ || direction == RW) {\n";
     print "     int failed = 0;\n";
     print "     test(my_$struct.a == my_${struct}2.a);\n";
@@ -73,6 +72,5 @@ for $i (0..$max_i) { for $j (0..$max_j) { for $k (0..$max_k) { for $l (0..$max_l
     print "     if (!failed) VERB0(\"Passed $struct\");\n";
     print "  }\n";
 }}}}
-    print "  return no_error;\n";
     print "}\n";
     ;