[MOAB-dev] r3725 - MOAB/trunk/itaps/imesh
kraftche at cae.wisc.edu
kraftche at cae.wisc.edu
Mon Mar 29 16:07:15 CDT 2010
Author: kraftche
Date: 2010-03-29 16:07:15 -0500 (Mon, 29 Mar 2010)
New Revision: 3725
Modified:
MOAB/trunk/itaps/imesh/iMeshP_unit_tests.cpp
Log:
fix bug in iMeshP unit test: all tests now pass
Modified: MOAB/trunk/itaps/imesh/iMeshP_unit_tests.cpp
===================================================================
--- MOAB/trunk/itaps/imesh/iMeshP_unit_tests.cpp 2010-03-29 21:06:55 UTC (rev 3724)
+++ MOAB/trunk/itaps/imesh/iMeshP_unit_tests.cpp 2010-03-29 21:07:15 UTC (rev 3725)
@@ -1624,15 +1624,17 @@
}
else {
std::vector<iBase_EntityHandle> results;
- do {
+ for (;;) {
iBase_EntityHandle handle;
iMesh_getNextEntIter( imesh, siter, &handle, &has_data, &ierr );
if (ierr != iBase_SUCCESS) {
single_step_error.push_back( part_pair );
break;
}
+ if (!has_data)
+ break;
results.push_back(handle);
- } while (has_data);
+ }
std::sort( results.begin(), results.end() );
if ((int)results.size() != num_shared_verts ||
@@ -1652,14 +1654,14 @@
iBase_EntityHandle results[5], *ptr = results;
int junk = 5, count;
iMesh_getNextEntArrIter( imesh, aiter, &ptr, &junk, &count, &has_data, &ierr );
- if (ierr != iBase_SUCCESS) {
+ if (ierr != iBase_SUCCESS || !has_data) {
array_step_error.push_back( part_pair );
continue;
}
assert(count <= 5);
assert(ptr == results);
std::sort(results, results + count);
- if (count != num_shared_verts || has_data ||
+ if (count != num_shared_verts ||
!std::equal( shared_verts, shared_verts + num_shared_verts, results ))
array_failed.push_back( part_pair );
}
More information about the moab-dev
mailing list