From 7288c74d3bde91dd08949d4f15e3b92de2056292 Mon Sep 17 00:00:00 2001 From: prascle Date: Sat, 15 Oct 2005 10:25:37 +0000 Subject: [PATCH] PR: test result summary in a file --- src/Basics/Test/BasicMainTest.hxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Basics/Test/BasicMainTest.hxx b/src/Basics/Test/BasicMainTest.hxx index ace8349ed..54b2db9ee 100644 --- a/src/Basics/Test/BasicMainTest.hxx +++ b/src/Basics/Test/BasicMainTest.hxx @@ -10,6 +10,9 @@ #include #include +#include +#include + // ============================================================================ /*! * Main program source for Unit Tests with cppunit package does not depend @@ -47,12 +50,16 @@ int main(int argc, char* argv[]) // --- 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. -- 2.39.2