aboutsummaryrefslogtreecommitdiff
path: root/engines/testbed/testbed.cpp
diff options
context:
space:
mode:
authorNeeraj Kumar2010-06-29 22:46:56 +0000
committerNeeraj Kumar2010-06-29 22:46:56 +0000
commit68d691bc3e5ee711daad2979c7db325c16e4c1f0 (patch)
tree31c807b49cbb113ce9f572f9c6ba7b01c2a3840d /engines/testbed/testbed.cpp
parente022dd7013aaf007ba7594ecf1e15d4c27502704 (diff)
downloadscummvm-rg350-68d691bc3e5ee711daad2979c7db325c16e4c1f0.tar.gz
scummvm-rg350-68d691bc3e5ee711daad2979c7db325c16e4c1f0.tar.bz2
scummvm-rg350-68d691bc3e5ee711daad2979c7db325c16e4c1f0.zip
removed all printfs, added logging feature in form of logPrintf
svn-id: r50512
Diffstat (limited to 'engines/testbed/testbed.cpp')
-rw-r--r--engines/testbed/testbed.cpp35
1 files changed, 10 insertions, 25 deletions
diff --git a/engines/testbed/testbed.cpp b/engines/testbed/testbed.cpp
index 5731483c66..3bb2490cf3 100644
--- a/engines/testbed/testbed.cpp
+++ b/engines/testbed/testbed.cpp
@@ -22,9 +22,10 @@
* $Id$
*/
+#include "common/debug-channels.h"
#include "common/scummsys.h"
#include "common/system.h"
-
+
#include "engines/util.h"
#include "testbed/fs.h"
@@ -32,6 +33,7 @@
#include "testbed/misc.h"
#include "testbed/savegame.h"
#include "testbed/testbed.h"
+#include "testbed/testsuite.h"
namespace Testbed {
@@ -45,38 +47,21 @@ TestbedEngine::TestbedEngine(OSystem *syst)
// However this is the place to specify all default directories
- printf("TestbedEngine::TestbedEngine()\n");
+ DebugMan.addDebugChannel(kTestbedLogOutput, "LOG", "Log of test results generated by testbed");
+ DebugMan.addDebugChannel(kTestbedEngineDebug, "Debug", "Engine-specific debug statements");
+ DebugMan.enableDebugChannel("LOG");
}
TestbedEngine::~TestbedEngine() {
- // Dispose your resources here
- printf("TestbedEngine::~TestbedEngine()\n");
-
+ Testsuite::deleteWriteStream();
// Remove all of our debug levels here
+ DebugMan.clearAllDebugChannels();
}
Common::Error TestbedEngine::run() {
// Initialize graphics using following:
initGraphics(320, 200, false);
- // You could use backend transactions directly as an alternative,
- // but it isn't recommended, until you want to handle the error values
- // from OSystem::endGFXTransaction yourself.
- // This is just an example template:
- //_system->beginGFXTransaction();
- // // This setup the graphics mode according to users seetings
- // initCommonGFX(false);
- //
- // // Specify dimensions of game graphics window.
- // // In this example: 320x200
- // _system->initSize(320, 200);
- //FIXME: You really want to handle
- //OSystem::kTransactionSizeChangeFailed here
- //_system->endGFXTransaction();
-
- // Additional setup.
- printf("TestbedEngine::init\n");
-
// As of now we are using GUI::MessageDialog for interaction, Test if it works.
// interactive mode could also be modified by a config parameter "non-interactive=1"
// TODO: Implement that
@@ -91,8 +76,8 @@ Common::Error TestbedEngine::run() {
Testsuite::isInteractive = false;
if (Testsuite::isInteractive) {
- printf("Running Interactive tests as well\n");
- Testsuite::displayMessage(prompt, "proceed?");
+ Testsuite::logPrintf("Info! : Interactive tests are also being executed.\n");
+ Testsuite::displayMessage(prompt, "Proceed?");
// Executing GFX Tests
GFXTestSuite gts;
gts.execute();