Description: Ensure test runner output flushed appropriately.
 commit 570: Flush stdout, stderr in progress listener to ensure progress displayed.
 commit 576: Flush stdout, stderr in test result destructor to prevent message loss
 Upstream change sets 570 and 576.
Author: Baptiste Lepilleur
Applied-Upstream: commit 570 (bug #1649369)
Applied-Upstream: commit 576 (bug #2832029)
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=400867
Last-Update: 2011-12-11


--- cppunit-1.12.1.orig/src/cppunit/TextTestProgressListener.cpp
+++ cppunit-1.12.1/src/cppunit/TextTestProgressListener.cpp
@@ -20,6 +20,7 @@
 TextTestProgressListener::startTest( Test *test )
 {
   stdCOut() << ".";
+  stdCOut().flush();
 }
 
 
@@ -27,6 +28,7 @@
 TextTestProgressListener::addFailure( const TestFailure &failure )
 {
   stdCOut() << ( failure.isError() ? "E" : "F" );
+  stdCOut().flush();
 }
 
 
--- cppunit-1.12.1.orig/src/cppunit/TestResult.cpp
+++ cppunit-1.12.1/src/cppunit/TestResult.cpp
@@ -3,6 +3,7 @@
 #include <cppunit/TestListener.h>
 #include <cppunit/TestResult.h>
 #include <cppunit/tools/Algorithm.h>
+#include <cppunit/portability/Stream.h>
 #include <algorithm>
 #include "DefaultProtector.h"
 #include "ProtectorChain.h"
@@ -22,6 +23,8 @@
 
 TestResult::~TestResult()
 {
+  stdCOut().flush();
+  stdCErr().flush();
   delete m_protectorChain;
 }
 
