[cgma-dev] r2268 - cgm/trunk/itaps

tautges at mcs.anl.gov tautges at mcs.anl.gov
Tue Nov 18 12:47:59 CST 2008


Author: tautges
Date: 2008-11-18 12:47:59 -0600 (Tue, 18 Nov 2008)
New Revision: 2268

Modified:
   cgm/trunk/itaps/testgeom.cc
Log:
Add a test which shuts down then re-instantiates cgm.



Modified: cgm/trunk/itaps/testgeom.cc
===================================================================
--- cgm/trunk/itaps/testgeom.cc	2008-11-17 17:53:43 UTC (rev 2267)
+++ cgm/trunk/itaps/testgeom.cc	2008-11-18 18:47:59 UTC (rev 2268)
@@ -96,6 +96,7 @@
 bool primitives_test(iGeom_Instance geom);
 bool transforms_test(iGeom_Instance geom);
 bool booleans_test(iGeom_Instance geom);
+bool shutdown_test(iGeom_Instance geom);
 
 void handle_error_code(const bool result,
                        int &number_failed,
@@ -227,6 +228,15 @@
   number_tests++;
   std::cout << "\n";
 
+    // shutdown test
+  std::cout << "   shutdown: ";
+  result = shutdown_test(geom);
+  handle_error_code(result, number_tests_failed,
+                    number_tests_not_implemented,
+                    number_tests_successful);
+  number_tests++;
+  std::cout << "\n";
+  
     // summary
 
   std::cout << "\nTSTT TEST SUMMARY: \n"
@@ -1137,3 +1147,17 @@
   CHECK( "Problems deleting for booleans unite test." );
   return true;
 }
+
+bool shutdown_test(iGeom_Instance geom) 
+{
+  int err;
+
+    // test shutdown & startup of interface
+  iGeom_dtor(geom, &err);
+  CHECK( "Interface destruction didn't work properly." );
+  
+  iGeom_newGeom(NULL, &geom, &err, 0);
+  CHECK( "Interface re-construction didn't work properly." );
+  
+  return true;
+}




More information about the cgma-dev mailing list