From 0dcbb723f35c910637c7311081f2cf21b9509d26 Mon Sep 17 00:00:00 2001 From: buret Date: Fri, 1 Jun 2007 12:44:01 +0000 Subject: Unitary tests OK git-svn-id: svn+ssh://pessac/svn/cesar/trunk@210 017c9cb6-072f-447c-8318-d5b54f68fe89 --- maximus/unittest/src/main.cpp | 29 +++++++---------------------- 1 file changed, 7 insertions(+), 22 deletions(-) (limited to 'maximus/unittest') diff --git a/maximus/unittest/src/main.cpp b/maximus/unittest/src/main.cpp index a61d368860..c88ba3f6e8 100644 --- a/maximus/unittest/src/main.cpp +++ b/maximus/unittest/src/main.cpp @@ -10,7 +10,6 @@ #include // for 'cout', 'cerr' and 'clog' #include // for ofstream' - using namespace std; @@ -20,28 +19,19 @@ int main (void) // Create a file for logging // - ofstream logFile ("unittestlog.txt"); + ofstream logFile("unittestlog.txt"); if (logFile) { - clog.rdbuf(logFile.rdbuf()); + //clog.rdbuf(logFile.rdbuf()); + clog.rdbuf(cout.rdbuf()); } else { cerr << "Error while opening log file" << endl; } - + clog << "Welcome to Fulminata Maximus simulator unitary tests" << endl << endl; - CoreEngine * pCoreEngine = NULL; - try - { - pCoreEngine = new CoreEngine (); - } - catch ( Error &e ) - { - e.display(); - } - try { cout << "testresult" << endl; @@ -66,16 +56,11 @@ int main (void) { e.display(); } - - if (NULL != pCoreEngine) - { - delete(pCoreEngine); - pCoreEngine = NULL; - } - + clog << endl << "--- END ---" << endl; + clog << flush; logFile.close(); - + return returnValue; } -- cgit v1.2.3