[MOAB-dev] r1270 - MOAB/trunk

kraftche at mcs.anl.gov kraftche at mcs.anl.gov
Wed Sep 12 17:59:16 CDT 2007


Author: kraftche
Date: 2007-09-12 17:59:16 -0500 (Wed, 12 Sep 2007)
New Revision: 1270

Modified:
   MOAB/trunk/MBTest.cpp
Log:
add test for another bug in get_entities_by_type_and_tag when that function is passed an empty meshset

Modified: MOAB/trunk/MBTest.cpp
===================================================================
--- MOAB/trunk/MBTest.cpp	2007-09-12 22:48:12 UTC (rev 1269)
+++ MOAB/trunk/MBTest.cpp	2007-09-12 22:59:16 UTC (rev 1270)
@@ -2847,6 +2847,24 @@
     return MB_FAILURE;
 
 
+    // now try the query with an empty meshset, expecting to get back
+    // an empty MBRange
+
+  result = MB->create_meshset( MESHSET_SET, meshset );
+  if (MB_SUCCESS != result)
+    return result;
+    
+  entities.clear();
+  result = MB->get_entities_by_type_and_tag(meshset, MBHEX, &junk_tag, 
+                                      &ptr_data, 1, entities );
+  if (MB_SUCCESS != result)
+    return result;
+    
+  if(!entities.empty())
+    return MB_FAILURE;
+  
+
+
   result = MB->tag_delete(stale_bits);
   if (MB_SUCCESS != result)
     return result;




More information about the moab-dev mailing list