[MOAB-dev] r2085 - MOAB/trunk

tautges at mcs.anl.gov tautges at mcs.anl.gov
Tue Sep 23 23:14:56 CDT 2008


Author: tautges
Date: 2008-09-23 23:14:56 -0500 (Tue, 23 Sep 2008)
New Revision: 2085

Modified:
   MOAB/trunk/MBTest.cpp
Log:
Committing a test which will break the meshset test.  Jason, you'll need to look at this one, looks like an off-by-one type of error in both range and vector sets.


Modified: MOAB/trunk/MBTest.cpp
===================================================================
--- MOAB/trunk/MBTest.cpp	2008-09-23 20:17:15 UTC (rev 2084)
+++ MOAB/trunk/MBTest.cpp	2008-09-24 04:14:56 UTC (rev 2085)
@@ -1359,6 +1359,36 @@
   result = check_esets(MB, start_num_sets + MBENTITYSET - MBEDGE + 4);
   if (MB_SUCCESS != result) return result;
 
+    //-------------Misc tests--------------
+  MBEntityHandle temp_ms3;
+  result = MB->create_meshset(flags, temp_ms3);
+  if(result  != MB_SUCCESS ) 
+    return result;
+
+  MBEntityHandle handle_array[] = {1, 2, 3, 4, 5, 7, 8, 9, 10};
+    //add ents to set
+  result = MB->add_entities( temp_ms3, handle_array, 
+                             sizeof(handle_array)/sizeof(MBEntityHandle));
+  if(result  != MB_SUCCESS ) 
+    return result;
+
+    // try adding again
+  result = MB->add_entities( temp_ms3, handle_array, 
+                             sizeof(handle_array)/sizeof(MBEntityHandle));
+  if(result  != MB_SUCCESS ) 
+    return result;
+
+  int num_ents;
+  result = MB->get_number_entities_by_handle(temp_ms3, num_ents);
+  if(result  != MB_SUCCESS ) return result;
+  else if (num_ents != sizeof(handle_array)/sizeof(MBEntityHandle))
+    return MB_FAILURE;
+
+  if(result != MB_SUCCESS )
+    return result;
+
+  
+
   return MB_SUCCESS;
 }
 




More information about the moab-dev mailing list