#include <cppunit/TestRunner.h>
#include <stdexcept>
+#include <iostream>
+#include <fstream>
+
// ============================================================================
/*!
* Main program source for Unit Tests with cppunit package does not depend
// --- Print test in a compiler compatible format.
- CPPUNIT_NS::CompilerOutputter outputter( &result, std::cerr );
+ std::ofstream testFile;
+ testFile.open("UnitTestsResult", std::ios::out | std::ios::trunc);
+ //CPPUNIT_NS::CompilerOutputter outputter( &result, std::cerr );
+ CPPUNIT_NS::CompilerOutputter outputter( &result, testFile );
outputter.write();
// --- Run the tests.
bool wasSucessful = result.wasSuccessful();
+ testFile.close();
// --- Return error code 1 if the one of test failed.