[MOAB-dev] r1691 - MOAB/trunk/tools/iMesh/SIDL
kraftche at mcs.anl.gov
kraftche at mcs.anl.gov
Tue Mar 25 11:58:17 CDT 2008
Author: kraftche
Date: 2008-03-25 11:58:17 -0500 (Tue, 25 Mar 2008)
New Revision: 1691
Modified:
MOAB/trunk/tools/iMesh/SIDL/testcxx.cpp
Log:
Fix broken test:
- Test expects non-forced tag deletion to fail
- Non-forced tag deletion fails if the tag is set on any entity
- Test does not verify that the tag is set on any entities
- Explicitly set tag on one entity to ensure that tag deletion fails as expected
Modified: MOAB/trunk/tools/iMesh/SIDL/testcxx.cpp
===================================================================
--- MOAB/trunk/tools/iMesh/SIDL/testcxx.cpp 2008-03-25 16:39:22 UTC (rev 1690)
+++ MOAB/trunk/tools/iMesh/SIDL/testcxx.cpp 2008-03-25 16:58:17 UTC (rev 1691)
@@ -2114,7 +2114,19 @@
// try deleting another unforced - should not get error
if (all_tags_size > 1) {
bool delete_err = false;
- try {mesh_stag.destroyTag(all_tags.get(1), false);}
+ try {
+ int num_ent;
+ sidl::array<void*> all_ents;
+ sidl::array<char> data = sidl::array<char>::create1d(100);
+ mesh.getEntities( 0, iBase::EntityType_ALL_TYPES, iMesh::EntityTopology_ALL_TOPOLOGIES, all_ents, num_ent );
+ if (num_ent > 0) {
+ mesh_stag.setEntSetData( all_ents.get(0), all_tags.get(1), data, 100 );
+ mesh_stag.destroyTag(all_tags.get(1), false);
+ }
+ else {
+ delete_err = true;
+ }
+ }
catch (iBase::Error) {
delete_err = true;
}
More information about the moab-dev
mailing list