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

kraftche at cae.wisc.edu kraftche at cae.wisc.edu
Wed Jun 15 16:27:18 CDT 2011


Author: kraftche
Date: 2011-06-15 16:27:17 -0500 (Wed, 15 Jun 2011)
New Revision: 5011

Added:
   MOAB/trunk/test/range_test.cpp
Modified:
   MOAB/trunk/test/MBTest.cpp
Log:
Move test of moab::Range from MBTest.cpp to a separate test executable,
and split the big mb_range_test function into separate test functions.

I need to add a new test or two of Range to reproduce an error and didn't
feel like adding yet another test to MBTest.cpp (which is thousands of lines
long), nor adding yet another block to the one test-all function for Range
that was in MBTest.cpp.




Modified: MOAB/trunk/test/MBTest.cpp
===================================================================
--- MOAB/trunk/test/MBTest.cpp	2011-06-15 20:45:15 UTC (rev 5010)
+++ MOAB/trunk/test/MBTest.cpp	2011-06-15 21:27:17 UTC (rev 5011)
@@ -4976,535 +4976,6 @@
   return MB_SUCCESS;
 }
 
-ErrorCode mb_range_test() 
-{
-
-  Range r1, r2, rhs;
-  ErrorCode result = MB_SUCCESS;
-  int err;
-
-  EntityHandle h1 = CREATE_HANDLE(MBVERTEX, 1, err);
-  EntityHandle h4 = CREATE_HANDLE(MBVERTEX, 4, err);
-  EntityHandle h5 = CREATE_HANDLE(MBVERTEX, 5, err);
-  EntityHandle h9 = CREATE_HANDLE(MBVERTEX, 9, err);
-  EntityHandle h10 = CREATE_HANDLE(MBVERTEX, 10, err);
-  EntityHandle h15 = CREATE_HANDLE(MBVERTEX, 15, err);
-  EntityHandle h16 = CREATE_HANDLE(MBVERTEX, 16, err);
-  EntityHandle h20 = CREATE_HANDLE(MBVERTEX, 20, err);
-  EntityHandle hh1 = CREATE_HANDLE(MBHEX, 1, err);
-  EntityHandle hh3 = CREATE_HANDLE(MBHEX, 3, err);
-
-    // equal start/end
-  r1.insert(h1, h5);
-  r1.insert(h10, h15);
-  r2.insert(h5, h10);
-  r2.insert(h15, h20);
-  
-  rhs = intersect( r1, r2);
-  if (rhs.size() != 3) {
-    result = MB_FAILURE;
-    std::cout << "Range test equal start/end failed." << std::endl;
-  }
-  
-    // identical ranges test
-  r1.clear(); r2.clear(); rhs.clear();
-  r1.insert(h1, h5); r1.insert(h10, h20); 
-  r2.insert(h1, h5); r2.insert(h10, h20); 
-  rhs = intersect( r1, r2);
-  if (rhs.size() != r1.size() || rhs.size() != r2.size()) {
-    result = MB_FAILURE;
-    std::cout << "Range test identical ranges failed." << std::endl;
-  }
-  
-    // off by one test
-  r1.clear(); r2.clear(); rhs.clear();
-  r1.insert(h1, h4); r1.insert(h10, h15); 


More information about the moab-dev mailing list