[MOAB-dev] r4757 - MOAB/trunk/test

iulian at mcs.anl.gov iulian at mcs.anl.gov
Wed Apr 20 12:50:02 CDT 2011


Author: iulian
Date: 2011-04-20 12:50:02 -0500 (Wed, 20 Apr 2011)
New Revision: 4757

Modified:
   MOAB/trunk/test/mbfacet_test.cpp
Log:
some tests redone with the results from splitting
also, remove the output file when done


Modified: MOAB/trunk/test/mbfacet_test.cpp
===================================================================
--- MOAB/trunk/test/mbfacet_test.cpp	2011-04-20 17:43:34 UTC (rev 4756)
+++ MOAB/trunk/test/mbfacet_test.cpp	2011-04-20 17:50:02 UTC (rev 4757)
@@ -33,6 +33,13 @@
 std::string TestDir(".");
 #endif
 
+std::string filename;
+std::string filename_out;
+std::string polygon_file_name;
+bool keep_output;
+int number_tests_successful = 0;
+int number_tests_failed = 0;
+
 #define PROCESS_ERROR(A, B)  {if (A!=MB_SUCCESS) {  std::cout << B << std::endl; return 1; } }
 
 #define CHECK( STR ) if (rval != MB_SUCCESS) return print_error( STR, rval, __FILE__, __LINE__ )
@@ -53,6 +60,7 @@
 ErrorCode normals_test(FBEngine * pFacet);
 ErrorCode ray_test(FBEngine * pFacet);
 ErrorCode split_test(Interface * mb, FBEngine * pFacet);
+ErrorCode check_split();
 
 void handle_error_code(ErrorCode rv, int &number_failed, int &number_successful)
 {
@@ -67,21 +75,25 @@
 
 int main(int argc, char *argv[])
 {
-  std::string filename = TestDir + "/PB.h5m";
-  std::string engine_opt;
+  filename = TestDir + "/PB.h5m";
+  polygon_file_name = TestDir + "/polyPB.txt";
+  filename_out = "PB_new.h5m";
+  keep_output = false;
 
   if (argc == 1) {
-    std::cout << "Using default input file: " << filename << std::endl;
-  } else if (argc == 2) {
+    std::cout << "Using default input files: " << filename << " " << polygon_file_name <<
+        " " << std::endl;
+    std::cout << "    default output file: " << filename_out << " will be deleted \n";
+  } else if (argc == 4) {
     filename = argv[1];
+    polygon_file_name = argv[2];
+    filename_out = argv[3];
+    keep_output = true;
   } else {
-    std::cerr << "Usage: " << argv[0] << " [geom_filename]" << std::endl;
+    std::cerr << "Usage: " << argv[0] << " [geom_filename] [polygon_file] [output_file]" << std::endl;


More information about the moab-dev mailing list