[MOAB-dev] r4552 - MOAB/trunk/test/h5file
kraftche at cae.wisc.edu
kraftche at cae.wisc.edu
Tue Mar 8 14:49:06 CST 2011
Author: kraftche
Date: 2011-03-08 14:49:05 -0600 (Tue, 08 Mar 2011)
New Revision: 4552
Modified:
MOAB/trunk/test/h5file/h5sets_test.cpp
Log:
add regression test for bug fixed in r4548
Modified: MOAB/trunk/test/h5file/h5sets_test.cpp
===================================================================
--- MOAB/trunk/test/h5file/h5sets_test.cpp 2011-03-08 18:58:46 UTC (rev 4551)
+++ MOAB/trunk/test/h5file/h5sets_test.cpp 2011-03-08 20:49:05 UTC (rev 4552)
@@ -307,6 +307,8 @@
void regression_mmiller_8_2010();
+
+void test_set_flags();
int main(int argc, char* argv[])
{
@@ -326,6 +328,7 @@
exitval += RUN_TEST( test_ranged_set_with_holes );
exitval += RUN_TEST( test_file_set );
exitval += RUN_TEST( test_small_tree );
+ exitval += RUN_TEST( test_set_flags );
exitval += RUN_TEST( regression_mmiller_8_2010 );
if (do_big_tree_test) {
exitval += RUN_TEST( test_big_tree );
@@ -575,3 +578,143 @@
expected.insert( PRI1+8 );
CHECK_EQUAL( expected, range );
}
+
+// Test to reproduce bug reported by brandom smith on 2011-3-7
+// and test other possible issues with the somewhat inconsistant
+// meshset creation flags. Bug was fixed in SVN revision 4548.
+void test_set_flags()
+{
+ const char filename[] = "test_set_flags.h5m";
+ ErrorCode rval;
+ Core core;
+ Interface& mb = core;
+
+ // create a bunch of vertices so we have something to put in sets
+ const int nverts = 20;
+ double coords[3*nverts] = {0.0};
+ Range verts;
+ rval = mb.create_vertices( coords, nverts, verts );
+ CHECK_ERR(rval);
+
+ // Assign IDs to things so that we can identify them in the
+ // data we read back in.
+ Tag tag;
+ rval = mb.tag_get_handle( "GLOBAL_ID", tag ); CHECK_ERR(rval);
+ int ids[nverts];
+ for (int i = 0; i < nverts; ++i)
+ ids[i] = i+1;
+ rval = mb.tag_set_data( tag, verts, ids ); CHECK_ERR(rval);
More information about the moab-dev
mailing list