[cig-commits] r21180 - short/3D/PyLith/trunk/unittests/libtests/meshio

brad at geodynamics.org brad at geodynamics.org
Wed Dec 19 10:47:19 PST 2012


Author: brad
Date: 2012-12-19 10:47:19 -0800 (Wed, 19 Dec 2012)
New Revision: 21180

Modified:
   short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTK.cc
Log:
Added useful error message.

Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTK.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTK.cc	2012-12-19 18:16:40 UTC (rev 21179)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTK.cc	2012-12-19 18:47:19 UTC (rev 21180)
@@ -53,9 +53,15 @@
   const std::string filenameE = "data/" + filename;
 
   std::ifstream fileInE(filenameE.c_str());
+  if (!fileInE.is_open()) {
+    std::cerr << "Could not open file '" << filenameE << "'." << std::endl;
+  } // if
   CPPUNIT_ASSERT(fileInE.is_open());
 
   std::ifstream fileIn(filename.c_str());
+  if (!fileIn.is_open()) {
+    std::cerr << "Could not open file '" << filename << "'." << std::endl;
+  } // if
   CPPUNIT_ASSERT(fileIn.is_open());
 
   const int maxLen = 256;



More information about the CIG-COMMITS mailing list