Hi there,
we started using cppunit 1.9.12 in RedHat 7.3. Very nice work! We now have junit and cppunit working side by side with many projects.
I just wanted to mention a stupid bug (very very minor) but still:
If there's only one test the TextOutputter will issue:
OK (1 tests)
It should really say:
OK (1 test)
Yes, I know, picky.
Oh, well. I checked out the latest dev from sourceforge (1.9.14) and the bug is still present there.
The fix is super simple, in src/cppunit/TextOutputter.cpp:
[anibal@anibal cppunit]$ diff -bu TextOutputter.cpp.orig TextOutputter.cpp
--- TextOutputter.cpp.orig 2004-03-14 17:24:24.000000000 -0500
+++ TextOutputter.cpp 2004-03-14 17:23:31.000000000 -0500
@@ -107,8 +107,15 @@
TextOutputter::printHeader()
{
if ( m_result->wasSuccessful() )
- m_stream << std::endl << "OK (" << m_result->runTests () << " tests)"
- << std::endl;
+ {
+ m_stream << std::endl << "OK (" << m_result->runTests ();
+
+ if ( m_result->tests().size() > 1 )
+ m_stream << " tests)";
+ else
+ m_stream << " test)";
+ m_stream << std::endl;
+ }
else
{
m_stream << std::endl;
You can write that in different ways, of course, but the key is checking m_result->tests().size().
Anyway, keep up the good work!
-Anibal Jodorcovsky
Montreal, Canada
|