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

iulian at mcs.anl.gov iulian at mcs.anl.gov
Tue May 3 12:17:51 CDT 2011


Author: iulian
Date: 2011-05-03 12:17:50 -0500 (Tue, 03 May 2011)
New Revision: 4797

Modified:
   MOAB/trunk/test/io/Makefile.am
   MOAB/trunk/test/io/read_cgm_test.cpp
Log:
use the HAVE_OCC_STEP flag defined in CGM_CPPFLAGS to decide on the 
proper test file


Modified: MOAB/trunk/test/io/Makefile.am
===================================================================
--- MOAB/trunk/test/io/Makefile.am	2011-05-03 16:22:12 UTC (rev 4796)
+++ MOAB/trunk/test/io/Makefile.am	2011-05-03 17:17:50 UTC (rev 4797)
@@ -58,6 +58,7 @@
 smf_test_SOURCES = $(srcdir)/../TestUtil.hpp smf_test.cc
 ccmio_test_SOURCES = $(srcdir)/../TestUtil.hpp ccmio_test.cpp
 read_cgm_test_SOURCES = $(srcdir)/../TestUtil.hpp read_cgm_test.cpp
+read_cgm_test_CXXFLAGS = $(CGM_CPPFLAGS)  $(CXXFLAGS)
 readutil_test_SOURCES = $(srcdir)/../TestUtil.hpp readutil_test.cpp
 
 MOSTLYCLEANFILES = dumped_acis.sat  \

Modified: MOAB/trunk/test/io/read_cgm_test.cpp
===================================================================
--- MOAB/trunk/test/io/read_cgm_test.cpp	2011-05-03 16:22:12 UTC (rev 4796)
+++ MOAB/trunk/test/io/read_cgm_test.cpp	2011-05-03 17:17:50 UTC (rev 4797)
@@ -16,33 +16,29 @@
   return A; } } while(false)
 
 #ifdef MESHDIR
+#ifdef HAVE_OCC_STEP
+static const char input_file[] = STRINGIFY(MESHDIR) "/io/dum.stp";
+#else
 static const char input_file[] = STRINGIFY(MESHDIR) "/io/dum.sat";
-static const char input_file2[] = STRINGIFY(MESHDIR) "/io/dum.stp";
+#endif
 #else
+#ifdef HAVE_OCC_STEP
+static const char input_file[] = "dum.stp";
+#else
 static const char input_file[] = "dum.sat";
-static const char input_file2[] = "dum.stp";
 #endif
+#endif
 
 void read_multiple_test() 
 {
   Core mb;
 
   ErrorCode rval = mb.load_file(input_file);
-  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);
-  }


More information about the moab-dev mailing list