summaryrefslogtreecommitdiff
path: root/maximus/unittest
diff options
context:
space:
mode:
Diffstat (limited to 'maximus/unittest')
-rw-r--r--maximus/unittest/src/main.cpp29
1 files changed, 7 insertions, 22 deletions
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 <iostream> // for 'cout', 'cerr' and 'clog'
#include <fstream> // 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;
}