[cig-commits] r18332 - short/3D/PyLith/trunk/unittests/libtests/topology
brad at geodynamics.org
brad at geodynamics.org
Fri May 6 14:10:45 PDT 2011
Author: brad
Date: 2011-05-06 14:10:44 -0700 (Fri, 06 May 2011)
New Revision: 18332
Modified:
short/3D/PyLith/trunk/unittests/libtests/topology/TestMeshOps.cc
Log:
Modified to use CPPUNIT_ASSERT_THROW.
Modified: short/3D/PyLith/trunk/unittests/libtests/topology/TestMeshOps.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/topology/TestMeshOps.cc 2011-05-06 20:39:08 UTC (rev 18331)
+++ short/3D/PyLith/trunk/unittests/libtests/topology/TestMeshOps.cc 2011-05-06 21:10:44 UTC (rev 18332)
@@ -47,15 +47,10 @@
MeshOps::checkMaterialIds(mesh, materialIds, numMaterials);
- bool caughtError = false;
- try {
- materialIds[0] = 99;
+ materialIds[0] = 99;
- MeshOps::checkMaterialIds(mesh, materialIds, numMaterials);
- } catch (const std::runtime_error& err) {
- caughtError = true;
- } // try/catch
- CPPUNIT_ASSERT(caughtError);
+ CPPUNIT_ASSERT_THROW(MeshOps::checkMaterialIds(mesh, materialIds, numMaterials),
+ std::runtime_error);
} // testCheckMaterialIds
More information about the CIG-COMMITS
mailing list