From 0a7bda50cca6ac76245254c6eb0de84547a018c1 Mon Sep 17 00:00:00 2001 From: Neeraj Kumar Date: Sat, 14 Aug 2010 08:32:39 +0000 Subject: TESTBED: formatting fix, deleted spaces/tabs at end of line svn-id: r52081 --- engines/testbed/config.cpp | 22 ++++++++++----------- engines/testbed/config.h | 4 ++-- engines/testbed/events.cpp | 10 +++++----- engines/testbed/fs.cpp | 8 ++++---- engines/testbed/graphics.cpp | 40 ++++++++++++++++++------------------- engines/testbed/midi.cpp | 6 +++--- engines/testbed/midi.h | 4 ++-- engines/testbed/misc.cpp | 8 ++++---- engines/testbed/sound.cpp | 46 +++++++++++++++++++++---------------------- engines/testbed/sound.h | 4 ++-- engines/testbed/template.h | 2 +- engines/testbed/testbed.cpp | 12 +++++------ engines/testbed/testbed.h | 4 ++-- engines/testbed/testsuite.cpp | 8 ++++---- engines/testbed/testsuite.h | 4 ++-- 15 files changed, 91 insertions(+), 91 deletions(-) (limited to 'engines') diff --git a/engines/testbed/config.cpp b/engines/testbed/config.cpp index 732e44e939..f20bbc4a3e 100644 --- a/engines/testbed/config.cpp +++ b/engines/testbed/config.cpp @@ -33,7 +33,7 @@ namespace Testbed { TestbedOptionsDialog::TestbedOptionsDialog(Common::Array &tsList, TestbedConfigManager *tsConfMan) : GUI::Dialog("Browser"), _testbedConfMan(tsConfMan) { - + new GUI::StaticTextWidget(this, "Browser.Headline", "Select Testsuites to Execute"); new GUI::StaticTextWidget(this, "Browser.Path", "Use Doubleclick to select/deselect"); @@ -54,7 +54,7 @@ TestbedOptionsDialog::TestbedOptionsDialog(Common::Array &tsList, T _colors.push_back(GUI::ThemeEngine::kFontColorAlternate); } } - + _testListDisplay = new TestbedListWidget(this, "Browser.List", _testSuiteArray); _testListDisplay->setNumberingMode(GUI::kListNumberingOff); _testListDisplay->setList(_testSuiteDescArray, &_colors); @@ -131,7 +131,7 @@ void TestbedOptionsDialog::handleCommand(GUI::CommandSender *sender, uint32 cmd, delete ws; default: GUI::Dialog::handleCommand(sender, cmd, data); - + } } @@ -162,7 +162,7 @@ void TestbedInteractionDialog::addList(uint x, uint y, uint w, uint h, Common::A _yOffset += h; } -void TestbedInteractionDialog::addButtonXY(uint x, uint y, uint w, uint h, const Common::String name, uint32 cmd) { +void TestbedInteractionDialog::addButtonXY(uint x, uint y, uint w, uint h, const Common::String name, uint32 cmd) { _buttonArray.push_back(new GUI::ButtonWidget(this, x, _yOffset, w, h, name, 0, cmd)); } @@ -193,7 +193,7 @@ void TestbedConfigManager::writeTestbedConfigToStream(Common::WriteStream *ws) { } Common::SeekableReadStream *TestbedConfigManager::getConfigReadStream() { - // Look for config file using SearchMan + // Look for config file using SearchMan Common::SeekableReadStream *rs = SearchMan.createReadStreamForMember(_configFileName); return rs; } @@ -208,9 +208,9 @@ Common::WriteStream *TestbedConfigManager::getConfigWriteStream() { return ws; } -void TestbedConfigManager::parseConfigFile() { +void TestbedConfigManager::parseConfigFile() { Common::SeekableReadStream *rs = getConfigReadStream(); - + if (!rs) { Testsuite::logPrintf("Info! No config file found, using default configuration.\n"); initDefaultConfiguration(); @@ -222,7 +222,7 @@ void TestbedConfigManager::parseConfigFile() { for (Common::ConfigFile::SectionList::const_iterator i = sections.begin(); i != sections.end(); i++) { if (i->name.equalsIgnoreCase("Global")) { - // Global params may be directly queried, ignore them + // Global params may be directly queried, ignore them } else { // A testsuite, process it. currTS = getTestsuiteByName(i->name); @@ -268,7 +268,7 @@ Testsuite *TestbedConfigManager::getTestsuiteByName(const Common::String &name) void TestbedConfigManager::selectTestsuites() { parseConfigFile(); - + if (_configFileInterface.hasKey("isSessionInteractive", "Global")) { Common::String in; _configFileInterface.getKey("isSessionInteractive", "Global", in); @@ -285,7 +285,7 @@ void TestbedConfigManager::selectTestsuites() { Common::String prompt("Welcome to the ScummVM testbed!\n" "It is a framework to test the various ScummVM subsystems namely GFX, Sound, FS, events etc.\n" "If you see this, it means interactive tests would run on this system :)\n"); - + if (!FSTestSuite::isGameDataFound()) { prompt += "\nSeems like Game data files are not configured properly.\n" "Create Game data files using script ./create-testbed-data.sh in dists/engine-data\n" @@ -298,7 +298,7 @@ void TestbedConfigManager::selectTestsuites() { if (Testsuite::handleInteractiveInput(prompt, "Proceed?", "Customize", kOptionRight)) { if (Engine::shouldQuit()) { return; - } + } // Select testsuites using checkboxes TestbedOptionsDialog tbd(_testsuiteList, this); tbd.runModal(); diff --git a/engines/testbed/config.h b/engines/testbed/config.h index 2e9669cf3b..2ee5b09002 100644 --- a/engines/testbed/config.h +++ b/engines/testbed/config.h @@ -80,7 +80,7 @@ public: _listColors[i] = GUI::ThemeEngine::kFontColorNormal; draw(); } - + void markAsDeselected(int i) { if (_list[i].contains("selected")) { _list[i] = _testSuiteArray[i]->getDescription(); @@ -88,7 +88,7 @@ public: _listColors[i] = GUI::ThemeEngine::kFontColorAlternate; draw(); } - + void setColor(uint32 indx, GUI::ThemeEngine::FontColor color) { assert(indx < _listColors.size()); _listColors[indx] = color; diff --git a/engines/testbed/events.cpp b/engines/testbed/events.cpp index 0bebc30bb1..3bc9c6a6d4 100644 --- a/engines/testbed/events.cpp +++ b/engines/testbed/events.cpp @@ -117,7 +117,7 @@ Common::Rect EventTests::drawFinishZone() { } TestExitStatus EventTests::mouseEvents() { - + Testsuite::clearScreen(); Common::String info = "Testing Mouse events.\n " "Any movement/click generated by L/R/M mouse buttons or the mouse wheel should be detected.\n" @@ -127,7 +127,7 @@ TestExitStatus EventTests::mouseEvents() { Testsuite::logPrintf("Info! Skipping test : keyboard events\n"); return kTestSkipped; } - + Common::EventManager *eventMan = g_system->getEventManager(); Common::Point pt(0, 30); @@ -227,12 +227,12 @@ TestExitStatus EventTests::mouseEvents() { Testsuite::logDetailedPrintf("Mouse clicks (L/R/M buttons) and wheel movements failed"); passed = kTestFailed; } - + return passed; } TestExitStatus EventTests::kbdEvents() { - + Testsuite::clearScreen(); Common::String info = "Testing keyboard events.\n " "Testbed should be able to figure out any alphanumeric keystrokes made by the user and display them back.\n" @@ -270,7 +270,7 @@ TestExitStatus EventTests::kbdEvents() { } TestExitStatus EventTests::showMainMenu() { - + Testsuite::clearScreen(); Common::String info = "Testing Main Menu events.\n " "Main Menu event is normally trigerred by user pressing (Ctrl + f5).\n" diff --git a/engines/testbed/fs.cpp b/engines/testbed/fs.cpp index 2f6a697d8e..4aad8e3890 100644 --- a/engines/testbed/fs.cpp +++ b/engines/testbed/fs.cpp @@ -96,12 +96,12 @@ TestExitStatus FStests::testReadFile() { fileName.toLowercase(); delete directory; directory = gameRoot.getSubDirectory(dirName); - + if (!directory) { Testsuite::logDetailedPrintf("Failed to open directory %s during FS tests\n", dirName.c_str()); return kTestFailed; } - + if (!readDataFromFile(directory, fileName.c_str())) { Testsuite::logDetailedPrintf("Reading from %s/%s failed\n", dirName.c_str(), fileName.c_str()); numFailed++; @@ -111,12 +111,12 @@ TestExitStatus FStests::testReadFile() { fileName.toUppercase(); delete directory; directory = gameRoot.getSubDirectory(dirName); - + if (!directory) { Testsuite::logDetailedPrintf("Failed to open directory %s during FS tests\n", dirName.c_str()); return kTestFailed; } - + if (!readDataFromFile(directory, fileName.c_str())) { Testsuite::logDetailedPrintf("Reading from %s/%s failed\n", dirName.c_str(), fileName.c_str()); numFailed++; diff --git a/engines/testbed/graphics.cpp b/engines/testbed/graphics.cpp index 40f77a98c1..d2e9a4ccad 100644 --- a/engines/testbed/graphics.cpp +++ b/engines/testbed/graphics.cpp @@ -82,7 +82,7 @@ void GFXTestSuite::setCustomColor(uint r, uint g, uint b) { _palette[8] = r; _palette[9] = g; _palette[10] = b; - + // Set colorNum kColorSpecial with a special color. int absIndx = kColorSpecial * 4; _palette[absIndx + 1] = 173; @@ -270,7 +270,7 @@ void GFXtests::setupMouseLoop(bool disableCursorPalette, const char *gfxModeName if (!gfxScalarMode.equals("")) { info = "The cursor size (yellow) should match the red rectangle."; } - + Testsuite::writeOnScreen(info, pt); info = "GFX Mode"; @@ -346,7 +346,7 @@ void GFXtests::setupMouseLoop(bool disableCursorPalette, const char *gfxModeName * Used by aspectRatio() */ void GFXtests::drawEllipse(int cx, int cy, int a, int b) { - + // Take a buffer of screen size int width = g_system->getWidth(); int height = Testsuite::getDisplayRegionCoordinates().y; @@ -404,7 +404,7 @@ TestExitStatus GFXtests::fullScreenMode() { Common::Point pt(0, 100); Common::Rect rect = Testsuite::writeOnScreen("Testing fullscreen mode", pt); - + if (Testsuite::handleInteractiveInput(info, "OK", "Skip", kOptionRight)) { Testsuite::logPrintf("Info! Skipping test : FullScreenMode\n"); return kTestSkipped; @@ -482,7 +482,7 @@ TestExitStatus GFXtests::fullScreenMode() { * Tests the aspect ratio correction by: drawing an ellipse, when corrected the ellipse should render to a circle */ TestExitStatus GFXtests::aspectRatio() { - + Testsuite::clearScreen(); Common::String info = "Aspect Ratio Correction test. If aspect ratio correction is enabled you should expect a circle on screen," " an ellipse otherwise."; @@ -564,12 +564,12 @@ TestExitStatus GFXtests::palettizedCursors() { Testsuite::logPrintf("Info! Skipping test : Palettized Cursors\n"); return kTestSkipped; } - + TestExitStatus passed = kTestPassed; // Testing with cursor Palette setupMouseLoop(); - + if (Testsuite::handleInteractiveInput("Which color did the cursor appeared to you?", "Yellow", "Any other", kOptionRight)) { Testsuite::logDetailedPrintf("Couldn't use cursor palette for rendering cursor\n"); passed = kTestFailed; @@ -603,7 +603,7 @@ TestExitStatus GFXtests::mouseMovements() { Testsuite::clearScreen(); // Make mouse visible CursorMan.showMouse(true); - + Common::String info = "Testing Automated Mouse movements.\n" "You should expect cursor hotspot(top-left corner) to automatically move from (0, 0) to (100, 100).\n" "There we have a rectangle drawn, finally the cursor would lie centred in that rectangle."; @@ -612,7 +612,7 @@ TestExitStatus GFXtests::mouseMovements() { Testsuite::logPrintf("Info! Skipping test : Mouse Movements\n"); return kTestSkipped; } - + // Draw Rectangle Graphics::Surface *screen = g_system->lockScreen(); screen->fillRect(Common::Rect::center(106, 106, 14, 14), 2); @@ -649,7 +649,7 @@ TestExitStatus GFXtests::mouseMovements() { * */ TestExitStatus GFXtests::copyRectToScreen() { - + Testsuite::clearScreen(); Common::String info = "Testing Blitting a Bitmap to screen.\n" "You should expect to see a 20x40 yellow horizontal rectangle centred at the screen."; @@ -658,7 +658,7 @@ TestExitStatus GFXtests::copyRectToScreen() { Testsuite::logPrintf("Info! Skipping test : Blitting Bitmap\n"); return kTestSkipped; } - + GFXTestSuite::setCustomColor(255, 255, 0); byte buffer[20 * 40]; memset(buffer, 2, 20 * 40); @@ -682,7 +682,7 @@ TestExitStatus GFXtests::copyRectToScreen() { * It is expected the screen minimizes when this feature is enabled */ TestExitStatus GFXtests::iconifyWindow() { - + Testsuite::clearScreen(); Common::String info = "Testing Iconify Window mode.\n If the feature is supported by the backend, " "you should expect the window to be minimized.\n However you would manually need to de-iconify."; @@ -691,7 +691,7 @@ TestExitStatus GFXtests::iconifyWindow() { Testsuite::logPrintf("Info! Skipping test : Iconifying window\n"); return kTestSkipped; } - + Common::Point pt(0, 100); Common::Rect rect = Testsuite::writeOnScreen("Testing Iconifying window", pt); @@ -794,7 +794,7 @@ TestExitStatus GFXtests::scaledCursors() { } TestExitStatus GFXtests::shakingEffect() { - + Testsuite::clearScreen(); Common::String info = "Shaking test. You should expect the graphics(text/bars etc) drawn on the screen to shake!"; @@ -822,7 +822,7 @@ TestExitStatus GFXtests::shakingEffect() { } TestExitStatus GFXtests::focusRectangle() { - + Testsuite::clearScreen(); Common::String info = "Testing : Setting and hiding Focus \n" "If this feature is implemented, the focus should be toggled between the two rectangles on the corners"; @@ -831,7 +831,7 @@ TestExitStatus GFXtests::focusRectangle() { Testsuite::logPrintf("Info! Skipping test : focus Rectangle\n"); return kTestSkipped; } - + const Graphics::Font &font(*FontMan.getFontByUsage(Graphics::FontManager::kConsoleFont)); Graphics::Surface *screen = g_system->lockScreen(); @@ -878,7 +878,7 @@ TestExitStatus GFXtests::overlayGraphics() { Testsuite::logPrintf("Info! Skipping test : Overlay Graphics\n"); return kTestSkipped; } - + Graphics::PixelFormat pf = g_system->getOverlayFormat(); OverlayColor buffer[50 * 100]; @@ -906,7 +906,7 @@ TestExitStatus GFXtests::overlayGraphics() { } TestExitStatus GFXtests::paletteRotation() { - + Common::String info = "Palette rotation. Here we draw a full 256 colored rainbow and then rotate it.\n" "Note that the screen graphics change without having to draw anything.\n" "The palette should appear to rotate, as a result, the background will change its color too.\n" @@ -953,7 +953,7 @@ TestExitStatus GFXtests::paletteRotation() { } g_system->copyRectToScreen(buffer, 256, 22, 50, 256, 30); - + // Show mouse CursorMan.showMouse(true); g_system->updateScreen(); @@ -961,7 +961,7 @@ TestExitStatus GFXtests::paletteRotation() { bool toRotate = true; Common::Event event; - + while (toRotate) { while (g_system->getEventManager()->pollEvent(event)) { if (event.type == Common::EVENT_LBUTTONDOWN || event.type == Common::EVENT_RBUTTONDOWN) { diff --git a/engines/testbed/midi.cpp b/engines/testbed/midi.cpp index f5e92982c2..0ec2678d47 100644 --- a/engines/testbed/midi.cpp +++ b/engines/testbed/midi.cpp @@ -68,7 +68,7 @@ void MidiTests::waitForMusicToPlay(MidiParser *parser) { if (!parser->isPlaying()) { quitLoop = true; } - } + } } } CursorMan.showMouse(false); @@ -100,7 +100,7 @@ TestExitStatus MidiTests::playMidiMusic() { Testsuite::logPrintf("Error! %s", errMsg.c_str()); return kTestFailed; } - + Testsuite::logDetailedPrintf("Info! Midi: Succesfully opened the driver\n"); Common::MemoryWriteStreamDynamic ws(DisposeAfterUse::YES); @@ -129,7 +129,7 @@ TestExitStatus MidiTests::playMidiMusic() { driver->close(); delete smfParser; delete driver; - + if (Testsuite::handleInteractiveInput("Were you able to hear the music as described?", "Yes", "No", kOptionRight)) { Testsuite::logDetailedPrintf("Error! Midi: Can't play Music\n"); return kTestFailed; diff --git a/engines/testbed/midi.h b/engines/testbed/midi.h index 1009179561..c73d937834 100644 --- a/engines/testbed/midi.h +++ b/engines/testbed/midi.h @@ -60,11 +60,11 @@ public: const char *getName() const { return "MIDI"; } - + const char *getDescription() const { return "Midi Music"; } - + void enable(bool flag); private: diff --git a/engines/testbed/misc.cpp b/engines/testbed/misc.cpp index 20813c4228..413ac69802 100644 --- a/engines/testbed/misc.cpp +++ b/engines/testbed/misc.cpp @@ -67,16 +67,16 @@ void MiscTests::criticalSection(void *arg) { } TestExitStatus MiscTests::testDateTime() { - + if (Testsuite::isSessionInteractive) { if (Testsuite::handleInteractiveInput("Testing the date time API implementation", "Continue", "Skip", kOptionRight)) { Testsuite::logPrintf("Info! Date time tests skipped by the user.\n"); return kTestSkipped; } - + Testsuite::writeOnScreen("Verifying Date-Time...", Common::Point(0, 100)); } - + TimeDate t1, t2; g_system->getTimeAndDate(t1); Testsuite::logDetailedPrintf("Current Time and Date: "); @@ -126,7 +126,7 @@ TestExitStatus MiscTests::testTimers() { } TestExitStatus MiscTests::testMutexes() { - + if (Testsuite::isSessionInteractive) { if (Testsuite::handleInteractiveInput("Testing the Mutual Exclusion API implementation", "Continue", "Skip", kOptionRight)) { Testsuite::logPrintf("Info! Mutex tests skipped by the user.\n"); diff --git a/engines/testbed/sound.cpp b/engines/testbed/sound.cpp index fac2437123..e256621553 100644 --- a/engines/testbed/sound.cpp +++ b/engines/testbed/sound.cpp @@ -50,15 +50,15 @@ SoundSubsystemDialog::SoundSubsystemDialog() : TestbedInteractionDialog(80, 60, _mixer = g_system->getMixer(); - // the three streams to be mixed + // the three streams to be mixed Audio::PCSpeaker *s1 = new Audio::PCSpeaker(); Audio::PCSpeaker *s2 = new Audio::PCSpeaker(); Audio::PCSpeaker *s3 = new Audio::PCSpeaker(); - + s1->play(Audio::PCSpeaker::kWaveFormSine, 1000, -1); s2->play(Audio::PCSpeaker::kWaveFormSine, 1200, -1); s3->play(Audio::PCSpeaker::kWaveFormSine, 1400, -1); - + _mixer->playStream(Audio::Mixer::kPlainSoundType, &_h1, s1); _mixer->pauseHandle(_h1, true); @@ -72,7 +72,7 @@ SoundSubsystemDialog::SoundSubsystemDialog() : TestbedInteractionDialog(80, 60, void SoundSubsystemDialog::handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data) { - + switch (cmd) { case kPlayChannel1: _buttonArray[0]->setLabel("Pause Channel #1"); @@ -112,7 +112,7 @@ void SoundSubsystemDialog::handleCommand(GUI::CommandSender *sender, uint32 cmd, TestExitStatus SoundSubsystem::playBeeps() { Testsuite::clearScreen(); - TestExitStatus passed = kTestPassed; + TestExitStatus passed = kTestPassed; Common::String info = "Testing Sound Output by generating beeps\n" "You should hear a left beep followed by a right beep\n"; @@ -120,31 +120,31 @@ TestExitStatus SoundSubsystem::playBeeps() { Testsuite::logPrintf("Info! Skipping test : Play Beeps\n"); return kTestSkipped; } - + Audio::PCSpeaker *speaker = new Audio::PCSpeaker(); Audio::Mixer *mixer = g_system->getMixer(); Audio::SoundHandle handle; mixer->playStream(Audio::Mixer::kPlainSoundType, &handle, speaker); - + // Left Beep Testsuite::writeOnScreen("Left Beep", Common::Point(0, 100)); mixer->setChannelBalance(handle, -127); speaker->play(Audio::PCSpeaker::kWaveFormSine, 1000, -1); g_system->delayMillis(500); mixer->pauseHandle(handle, true); - + if (Testsuite::handleInteractiveInput(" Were you able to hear the left beep? ", "Yes", "No", kOptionRight)) { Testsuite::logDetailedPrintf("Error! Left Beep couldn't be detected : Error with Mixer::setChannelBalance()\n"); passed = kTestFailed; } - + // Right Beep Testsuite::writeOnScreen("Right Beep", Common::Point(0, 100)); mixer->setChannelBalance(handle, 127); mixer->pauseHandle(handle, false); g_system->delayMillis(500); mixer->stopAll(); - + if (Testsuite::handleInteractiveInput("Were you able to hear the right beep?", "Yes", "No", kOptionRight)) { Testsuite::logDetailedPrintf("Error! Right Beep couldn't be detected : Error with Mixer::setChannelBalance()\n"); passed = kTestFailed; @@ -154,7 +154,7 @@ TestExitStatus SoundSubsystem::playBeeps() { TestExitStatus SoundSubsystem::mixSounds() { Testsuite::clearScreen(); - TestExitStatus passed = kTestPassed; + TestExitStatus passed = kTestPassed; Common::String info = "Testing Mixer Output by generating multichannel sound output using PC speaker emulator.\n" "The mixer should be able to play them simultaneously\n"; @@ -174,7 +174,7 @@ TestExitStatus SoundSubsystem::mixSounds() { TestExitStatus SoundSubsystem::audiocdOutput() { Testsuite::clearScreen(); - TestExitStatus passed = kTestPassed; + TestExitStatus passed = kTestPassed; Common::String info = "Testing AudioCD API implementation.\n" "Here we have four tracks, we play them in order i.e 1-2-3-last.\n" "The user should verify if the tracks were run in correct order or not."; @@ -183,13 +183,13 @@ TestExitStatus SoundSubsystem::audiocdOutput() { Testsuite::logPrintf("Info! Skipping test : AudioCD API\n"); return kTestSkipped; } - + Common::Point pt(0, 100); Testsuite::writeOnScreen("Playing the tracks of testCD in order i.e 1-2-3-last", pt); - + // Play all tracks - for (int i = 1; i < 5; i++) { + for (int i = 1; i < 5; i++) { AudioCD.play(i, 1, 0, 0); while (AudioCD.isPlaying()) { g_system->delayMillis(500); @@ -203,12 +203,12 @@ TestExitStatus SoundSubsystem::audiocdOutput() { Testsuite::logPrintf("Error! Error in AudioCD.play() or probably sound files were not detected, try -d1 (debuglevel 1)\n"); passed = kTestFailed; } - + return passed; } TestExitStatus SoundSubsystem::sampleRates() { - + Common::String info = "Testing Multiple Sample Rates.\n" "Here we try to play sounds at three different sample rates."; @@ -216,7 +216,7 @@ TestExitStatus SoundSubsystem::sampleRates() { Testsuite::logPrintf("Info! Skipping test : Sample Rates\n"); return kTestSkipped; } - + TestExitStatus passed = kTestPassed; Audio::Mixer *mixer = g_system->getMixer(); @@ -225,14 +225,14 @@ TestExitStatus SoundSubsystem::sampleRates() { Audio::PCSpeaker *s2 = new Audio::PCSpeaker(s1->getRate() - 10000); // Stream at twice sampling rate Audio::PCSpeaker *s3 = new Audio::PCSpeaker(s1->getRate() + 10000); - + s1->play(Audio::PCSpeaker::kWaveFormSine, 1000, -1); s2->play(Audio::PCSpeaker::kWaveFormSine, 1000, -1); s3->play(Audio::PCSpeaker::kWaveFormSine, 1000, -1); - + Audio::SoundHandle handle; Common::Point pt(0, 100); - + mixer->playStream(Audio::Mixer::kPlainSoundType, &handle, s1); Testsuite::writeOnScreen(Common::String::printf("Playing at smaple rate: %d", s1->getRate()), pt); g_system->delayMillis(1000); @@ -250,7 +250,7 @@ TestExitStatus SoundSubsystem::sampleRates() { g_system->delayMillis(1000); mixer->stopHandle(handle); g_system->delayMillis(1000); - + Testsuite::clearScreen(); if (Testsuite::handleInteractiveInput("Was the mixer able to play beeps with variable sample rates?", "Yes", "No", kOptionRight)) { Testsuite::logDetailedPrintf("Error! Error with variable sample rates\n"); @@ -263,7 +263,7 @@ TestExitStatus SoundSubsystem::sampleRates() { SoundSubsystemTestSuite::SoundSubsystemTestSuite() { addTest("SimpleBeeps", &SoundSubsystem::playBeeps, true); addTest("MixSounds", &SoundSubsystem::mixSounds, true); - + // Make audio-files discoverable Common::FSNode gameRoot(ConfMan.get("path")); if (gameRoot.exists()) { diff --git a/engines/testbed/sound.h b/engines/testbed/sound.h index 5b9cd5bdfc..24dcf45b99 100644 --- a/engines/testbed/sound.h +++ b/engines/testbed/sound.h @@ -64,11 +64,11 @@ public: */ SoundSubsystemTestSuite(); ~SoundSubsystemTestSuite() {} - + const char *getName() const { return "SoundSubsystem"; } - + const char *getDescription() const { return "Sound Subsystem"; } diff --git a/engines/testbed/template.h b/engines/testbed/template.h index a2efca1157..849d157a03 100644 --- a/engines/testbed/template.h +++ b/engines/testbed/template.h @@ -55,7 +55,7 @@ public: const char *getName() const { return "Dummy Template"; } - + const char *getDescription() const { return "Some Arbit description"; } diff --git a/engines/testbed/testbed.cpp b/engines/testbed/testbed.cpp index e538c7f20c..a4e6429e44 100644 --- a/engines/testbed/testbed.cpp +++ b/engines/testbed/testbed.cpp @@ -49,7 +49,7 @@ void TestbedExitDialog::init() { addText(450, 20, text, Graphics::kTextAlignCenter, _xOffset, 15); Common::Array strArray; GUI::ListWidget::ColorList colors; - + for (Common::Array::const_iterator i = _testsuiteList.begin(); i != _testsuiteList.end(); ++i) { strArray.push_back(Common::String::printf("%s :", (*i)->getDescription())); colors.push_back(GUI::ThemeEngine::kFontColorNormal); @@ -60,7 +60,7 @@ void TestbedExitDialog::init() { } colors.push_back(GUI::ThemeEngine::kFontColorAlternate); } - + addList(0, _yOffset, 500, 200, strArray, &colors); text = "More Details can be viewed in the Log file : " + Testsuite::getLogFile(); addText(450, 20, text, Graphics::kTextAlignLeft, 0, 0); @@ -103,7 +103,7 @@ TestbedEngine::TestbedEngine(OSystem *syst) if (gameRoot.exists()) { SearchMan.addDirectory(gameRoot.getDisplayName(), gameRoot); } - + DebugMan.addDebugChannel(kTestbedLogOutput, "LOG", "Log of test results generated by testbed"); DebugMan.addDebugChannel(kTestbedEngineDebug, "Debug", "Engine-specific debug statements"); DebugMan.enableDebugChannel("LOG"); @@ -169,7 +169,7 @@ Common::Error TestbedEngine::run() { // TODO: Implement that TestbedConfigManager cfMan(_testsuiteList, "testbed.config"); - + // Keep running if rerun requested do { @@ -182,13 +182,13 @@ Common::Error TestbedEngine::run() { if (Engine::shouldQuit()) { return Common::kNoError; } - + TestbedExitDialog tbDialog(_testsuiteList); tbDialog.init(); tbDialog.run(); } while (TestbedExitDialog::rerunRequired()); - + return Common::kNoError; } diff --git a/engines/testbed/testbed.h b/engines/testbed/testbed.h index 1ae0c3563c..3e29cd6be8 100644 --- a/engines/testbed/testbed.h +++ b/engines/testbed/testbed.h @@ -38,7 +38,7 @@ class TestbedConfigManager; enum { kTestbedLogOutput = 1 << 0, - kTestbedEngineDebug = 1 << 2, + kTestbedEngineDebug = 1 << 2, kCmdRerunTestbed = 'crtb' }; @@ -55,7 +55,7 @@ public: void invokeTestsuites(TestbedConfigManager &cfMan); bool hasFeature(EngineFeature f) const; - + private: Common::Array _testsuiteList; }; diff --git a/engines/testbed/testsuite.cpp b/engines/testbed/testsuite.cpp index dff96f73f4..54875cdbaa 100644 --- a/engines/testbed/testsuite.cpp +++ b/engines/testbed/testsuite.cpp @@ -203,7 +203,7 @@ void Testsuite::clearScreen(const Common::Rect &rect) { void Testsuite::clearScreen() { int numBytesPerLine = g_system->getWidth() * g_system->getScreenFormat().bytesPerPixel; int height = getDisplayRegionCoordinates().y; - + // Don't clear test info display region int size = height * numBytesPerLine; byte *buffer = new byte[size]; @@ -278,7 +278,7 @@ uint Testsuite::parseEvents() { void Testsuite::updateStats(const char *prefix, const char *info, uint testNum, uint numTests, Common::Point pt) { Common::String text = Common::String::printf(" Running %s: %s (%d of %d) ", prefix, info, testNum, numTests); writeOnScreen(text, pt); - uint barColor = kColorSpecial; + uint barColor = kColorSpecial; // below the text a rectangle denoting the progress in the testsuite can be drawn. int separation = getLineSeparation(); pt.y += separation; @@ -293,7 +293,7 @@ void Testsuite::updateStats(const char *prefix, const char *info, uint testNum, // draw the boundary memset(buffer, barColor, sizeof(byte) * wRect); memset(buffer + (wRect * (lRect - 1)) , barColor, sizeof(byte) * wRect); - + for (int i = 0; i < lRect; i++) { for (int j = 0; j < wRect; j++) { if (j < wShaded) { @@ -331,7 +331,7 @@ void Testsuite::execute() { if (!(*i)->enabled) { logPrintf("Info! Skipping Test: %s, Skipped by configuration.\n", ((*i)->featureName).c_str()); _numTestsSkipped++; - continue; + continue; } if((*i)->isInteractive && !isSessionInteractive) { diff --git a/engines/testbed/testsuite.h b/engines/testbed/testsuite.h index 4a9843a06a..cbd55008f6 100644 --- a/engines/testbed/testsuite.h +++ b/engines/testbed/testsuite.h @@ -100,7 +100,7 @@ public: } bool enableTest(const Common::String &testName, bool enable); void reset(); - + /** * Prompts for User Input in form of "Yes" or "No" for interactive tests * e.g: "Is this like you expect?" "Yes" or "No" @@ -156,7 +156,7 @@ public: static void deleteWriteStream(); // Progress bar (Information Display) related methods. - /** + /** * Display region is in the bottom. Probably 1/4th of the game screen. * It contains: * 1) Information about executing testsuite. -- cgit v1.2.3