[MOAB-dev] r5068 - MOAB/trunk/itaps/imesh

iulian at mcs.anl.gov iulian at mcs.anl.gov
Thu Jul 21 12:12:25 CDT 2011


Author: iulian
Date: 2011-07-21 12:12:25 -0500 (Thu, 21 Jul 2011)
New Revision: 5068

Modified:
   MOAB/trunk/itaps/imesh/MOAB_iMesh_unit_tests.cpp
   MOAB/trunk/itaps/imesh/iMesh_MOAB.cpp
Log:
variable length tags were slipping through iMesh, so visit could not read 
files with edge sense tags in it


Modified: MOAB/trunk/itaps/imesh/MOAB_iMesh_unit_tests.cpp
===================================================================
--- MOAB/trunk/itaps/imesh/MOAB_iMesh_unit_tests.cpp	2011-07-21 16:19:03 UTC (rev 5067)
+++ MOAB/trunk/itaps/imesh/MOAB_iMesh_unit_tests.cpp	2011-07-21 17:12:25 UTC (rev 5068)
@@ -11,6 +11,7 @@
 void test_getEntArrAdj_invalid_size();
 void test_getEntArrAdj_none();
 void test_existinterface();
+void test_tags_retrieval();
 
 int main( int argc, char* argv[] )
 {
@@ -21,6 +22,7 @@
   REGISTER_TEST( test_getEntArrAdj_invalid_size );
   REGISTER_TEST( test_getEntArrAdj_none );
   REGISTER_TEST( test_existinterface );
+  REGISTER_TEST( test_tags_retrieval );
 
   return RUN_TESTS( argc, argv ); 
 }
@@ -409,3 +411,59 @@
   delete core;
 }
 
+void test_tags_retrieval()
+{
+  iMesh_Instance mesh;
+  int err;
+  iMesh_newMesh("", &mesh, &err, 0);
+  CHECK_EQUAL( iBase_SUCCESS, err );
+
+  iBase_EntitySetHandle root_set;
+  iMesh_getRootSet(mesh, &root_set, &err);
+  CHECK_EQUAL( iBase_SUCCESS, err );
+
+  // open a file with var len tags (sense tags)
+  // they should be filtered out
+  char test_file[] = "../../MeshFiles/unittest/PB.h5m";
+
+  iMesh_load(mesh, root_set, test_file, NULL, &err, strlen(
+      test_file), 0);
+  CHECK_EQUAL( iBase_SUCCESS, err );
+
+  iBase_EntitySetHandle* contained_set_handles = NULL;
+  int contained_set_handles_allocated = 0;
+  int contained_set_handles_size;
+  // get all entity sets
+  iMesh_getEntSets(mesh, root_set, 1,
+      &contained_set_handles,
+      &contained_set_handles_allocated,
+      &contained_set_handles_size,


More information about the moab-dev mailing list