[MOAB-dev] r4624 - MOAB/trunk/test/h5file

kraftche at cae.wisc.edu kraftche at cae.wisc.edu
Mon Mar 21 15:07:13 CDT 2011


Author: kraftche
Date: 2011-03-21 15:07:13 -0500 (Mon, 21 Mar 2011)
New Revision: 4624

Modified:
   MOAB/trunk/test/h5file/validate.c
Log:
more accurate output from h5mvalidate tool

Modified: MOAB/trunk/test/h5file/validate.c
===================================================================
--- MOAB/trunk/test/h5file/validate.c	2011-03-21 19:23:05 UTC (rev 4623)
+++ MOAB/trunk/test/h5file/validate.c	2011-03-21 20:07:13 UTC (rev 4624)
@@ -741,8 +741,9 @@
   const char cldstr[] = "Child";
   const char* name = parents ? parstr : cldstr;
   long i, prev, start, n;
-  long invalid = 0;
+  long invalid = 0, invalid_dup = 0;
   long range[2];
+  int result = 0;
   range[0] = start_id;
   range[1] = count;
   
@@ -785,7 +786,7 @@
     else if (contains_duplicates( contents+start, n )) {
       if (VERBOSE)
         printf("Set %ld (ID %ld) %s list contains duplicate IDs.\n", i, start_id+i, name );
-      ++invalid;
+      ++invalid_dup;
     }
   }
   
@@ -794,10 +795,15 @@
   
   if (invalid) {
     printf( "%ld sets had invalid %s lists.\n", invalid, name );
-    return 1;
+    result = 1;
   }
   
-  return 0;
+  if (invalid_dup) {
+    printf( "%ld sets had duplicate handles in %s lists.\n", invalid_dup, name );
+    result = 1;
+  }
+  
+  return result;
 }
 
 static int merge_ranges( long* ranges, int nranges )











More information about the moab-dev mailing list