[MOAB-dev] r4795 - MOAB/trunk/test/io

iulian at mcs.anl.gov iulian at mcs.anl.gov
Tue May 3 11:16:06 CDT 2011


Author: iulian
Date: 2011-05-03 11:16:05 -0500 (Tue, 03 May 2011)
New Revision: 4795

Modified:
   MOAB/trunk/test/io/read_cgm_test.cpp
Log:
if the first file tried is not loaded successfully, try an stp file, supported
by occ too.
Then load it the second time, for the "multiple file load"
With this, moab built with cgm based occ passes all tests



Modified: MOAB/trunk/test/io/read_cgm_test.cpp
===================================================================
--- MOAB/trunk/test/io/read_cgm_test.cpp	2011-05-03 16:00:45 UTC (rev 4794)
+++ MOAB/trunk/test/io/read_cgm_test.cpp	2011-05-03 16:16:05 UTC (rev 4795)
@@ -17,8 +17,10 @@
 
 #ifdef MESHDIR
 static const char input_file[] = STRINGIFY(MESHDIR) "/io/dum.sat";
+static const char input_file2[] = STRINGIFY(MESHDIR) "/io/dum.stp";
 #else
 static const char input_file[] = "dum.sat";
+static const char input_file2[] = "dum.stp";
 #endif
 
 void read_multiple_test() 
@@ -26,10 +28,21 @@
   Core mb;
 
   ErrorCode rval = mb.load_file(input_file);
-  CHECK_ERR(rval);
-  
-  rval = mb.load_file(input_file);
-  CHECK_ERR(rval);
+  if (rval!=MB_SUCCESS)
+  {
+    std::cout<<"try loading now an stp file, supported by occ\n";
+    // try loading an stp file, maybe
+    rval = mb.load_file(input_file2);
+    CHECK_ERR(rval);
+    // try to load it second time
+    rval = mb.load_file(input_file2);
+    CHECK_ERR(rval);
+  }
+  else
+  {
+    rval = mb.load_file(input_file);
+    CHECK_ERR(rval);
+  }
 }
   
 int main(int argc, char* argv[])












More information about the moab-dev mailing list