[cig-commits] r17170 - short/3D/PyLith/branches/v1.5-stable/unittests/libtests/bc

brad at geodynamics.org brad at geodynamics.org
Thu Sep 2 17:55:19 PDT 2010


Author: brad
Date: 2010-09-02 17:55:19 -0700 (Thu, 02 Sep 2010)
New Revision: 17170

Modified:
   short/3D/PyLith/branches/v1.5-stable/unittests/libtests/bc/TestTimeDependent.cc
Log:
Use CPPUNIT_ASSERT_THROW to verify exception.

Modified: short/3D/PyLith/branches/v1.5-stable/unittests/libtests/bc/TestTimeDependent.cc
===================================================================
--- short/3D/PyLith/branches/v1.5-stable/unittests/libtests/bc/TestTimeDependent.cc	2010-09-03 00:33:01 UTC (rev 17169)
+++ short/3D/PyLith/branches/v1.5-stable/unittests/libtests/bc/TestTimeDependent.cc	2010-09-03 00:55:19 UTC (rev 17170)
@@ -125,13 +125,8 @@
     PointForce bc;
     bc.dbTimeHistory(&th);
 
-    bool caught = false;
-    try {
-      bc.TimeDependent::verifyConfiguration(mesh);
-    } catch ( const std::exception& err) {
-      caught = true;
-    } // catch
-    CPPUNIT_ASSERT(caught);
+    CPPUNIT_ASSERT_THROW(bc.TimeDependent::verifyConfiguration(mesh),
+			 std::runtime_error);
   } // change (missing change)
 
 } // testVerifyConfiguration



More information about the CIG-COMMITS mailing list