Update of /cvsroot/mockpp/mockpp/mockpp/examples/tutorial
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24246
Modified Files:
verifying.cpp
Log Message:
fix for missing cppunit
Index: verifying.cpp
===================================================================
RCS file: /cvsroot/mockpp/mockpp/mockpp/examples/tutorial/verifying.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- verifying.cpp 5 Apr 2005 18:44:05 -0000 1.10
+++ verifying.cpp 1 May 2005 14:20:51 -0000 1.11
@@ -12,6 +12,10 @@
#include <mockpp/mockpp.h> // always first
+#include <iostream>
+
+#ifdef HAVE_CPPUNIT
+
#include <mockpp/VerifyingTestCase.h>
#include <mockpp/ExpectationValue.h>
@@ -103,9 +107,11 @@
// missing actual
}
+#endif // HAVE_CPPUNIT
int main(int argc, char ** /*argv*/)
{
+#ifdef HAVE_CPPUNIT
if (argc != 1)
global_error = argc; // disturb tests
@@ -114,4 +120,8 @@
CppUnit::TestFactory ®istry = CppUnit::TestFactoryRegistry::getRegistry();
runner.addTest(registry.makeTest());
return runner.run() ? 0 : 1;
+#else
+ std::cout << "CppUnit was not available at compile time.\n";
+ return 1;
+#endif
}
|