aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/testbed/config.cpp5
-rw-r--r--engines/testbed/config.h7
-rw-r--r--engines/testbed/events.cpp4
-rw-r--r--engines/testbed/events.h7
-rw-r--r--engines/testbed/fs.cpp4
-rw-r--r--engines/testbed/fs.h7
-rw-r--r--engines/testbed/graphics.cpp4
-rw-r--r--engines/testbed/graphics.h7
-rw-r--r--engines/testbed/misc.cpp4
-rw-r--r--engines/testbed/misc.h7
-rw-r--r--engines/testbed/savegame.cpp4
-rw-r--r--engines/testbed/savegame.h7
-rw-r--r--engines/testbed/testsuite.h1
13 files changed, 38 insertions, 30 deletions
diff --git a/engines/testbed/config.cpp b/engines/testbed/config.cpp
index 66fd6fdb7a..afd507a290 100644
--- a/engines/testbed/config.cpp
+++ b/engines/testbed/config.cpp
@@ -41,10 +41,11 @@ TestbedOptionsDialog::TestbedOptionsDialog(Common::Array<Testsuite *> &tsList, T
for (iter = tsList.begin(); iter != tsList.end(); iter++) {
_testSuiteArray.push_back((*iter)->getName());
+ _testSuiteDescArray.push_back((*iter)->getDescription());
_colors.push_back(GUI::ThemeEngine::kFontColorAlternate);
}
- _testListDisplay->setList(_testSuiteArray, &_colors);
+ _testListDisplay->setList(_testSuiteDescArray, &_colors);
new GUI::ButtonWidget(this, "Browser.Up", "Select All", kTestbedSelectAll, 0);
new GUI::ButtonWidget(this, "Browser.Cancel", "Continue", GUI::kCloseCmd);
@@ -58,7 +59,7 @@ void TestbedOptionsDialog::handleCommand(GUI::CommandSender *sender, uint32 cmd,
Testsuite *ts;
switch (cmd) {
case kSelectionToggle:
- ts = _testbedConfMan->getTestsuiteByName(_testListDisplay->getSelectedString());
+ ts = _testbedConfMan->getTestsuiteByName(_testSuiteArray[_testListDisplay->getSelected()]);
if (ts) {
ts->enable(!ts->isEnabled());
_testListDisplay->changeColor();
diff --git a/engines/testbed/config.h b/engines/testbed/config.h
index b981d25070..6fecf771ab 100644
--- a/engines/testbed/config.h
+++ b/engines/testbed/config.h
@@ -39,9 +39,9 @@
namespace Testbed {
enum {
- kSelectionToggle = 16799, // Some random Number (A better way to do this?)
- kTestbedQuitCmd,
- kTestbedSelectAll
+ kSelectionToggle = 'Tgle',
+ kTestbedQuitCmd = 'Quit',
+ kTestbedSelectAll = 'sAll'
};
class TestbedConfigManager {
@@ -102,6 +102,7 @@ public:
private:
GUI::ListWidget::ColorList _colors;
Common::StringArray _testSuiteArray;
+ Common::StringArray _testSuiteDescArray;
TestbedListWidget *_testListDisplay;
TestbedConfigManager *_testbedConfMan;
};
diff --git a/engines/testbed/events.cpp b/engines/testbed/events.cpp
index 10ee870e73..e0c44799ec 100644
--- a/engines/testbed/events.cpp
+++ b/engines/testbed/events.cpp
@@ -238,8 +238,4 @@ EventTestSuite::EventTestSuite() {
addTest("Mainmenu Event", &EventTests::showMainMenu);
}
-const char *EventTestSuite::getName() const {
- return "Events";
-}
-
} // End of namespace Testbed
diff --git a/engines/testbed/events.h b/engines/testbed/events.h
index 187fa5a183..d6c78ce1cb 100644
--- a/engines/testbed/events.h
+++ b/engines/testbed/events.h
@@ -53,7 +53,12 @@ public:
*/
EventTestSuite();
~EventTestSuite() {}
- const char *getName() const;
+ const char *getName() const {
+ return "Events";
+ }
+ const char *getDescription() const {
+ return "Events : Keyboard/Mouse/RTL";
+ }
};
} // End of namespace Testbed
diff --git a/engines/testbed/fs.cpp b/engines/testbed/fs.cpp
index 5e406d902f..2441baa218 100644
--- a/engines/testbed/fs.cpp
+++ b/engines/testbed/fs.cpp
@@ -150,10 +150,6 @@ FSTestSuite::FSTestSuite() {
addTest("WritingFile", &FStests::testWriteFile, false);
}
-const char *FSTestSuite::getName() const {
- return "FS";
-}
-
void FSTestSuite::enable(bool flag) {
const Common::String &path = ConfMan.get("path");
Common::FSNode gameRoot(path);
diff --git a/engines/testbed/fs.h b/engines/testbed/fs.h
index 1ffda0927b..a5e79c10ce 100644
--- a/engines/testbed/fs.h
+++ b/engines/testbed/fs.h
@@ -60,7 +60,12 @@ public:
*/
FSTestSuite();
~FSTestSuite() {}
- const char *getName() const;
+ const char *getName() const {
+ return "FS";
+ }
+ const char *getDescription() const {
+ return "File system tests (Navigation, Read/Write)";
+ }
void enable(bool flag);
};
diff --git a/engines/testbed/graphics.cpp b/engines/testbed/graphics.cpp
index 23747674cc..70bf267456 100644
--- a/engines/testbed/graphics.cpp
+++ b/engines/testbed/graphics.cpp
@@ -76,10 +76,6 @@ GFXTestSuite::GFXTestSuite() {
//addTest("Pixel Formats", &GFXtests::pixelFormats);
}
-const char *GFXTestSuite::getName() const {
- return "GFX";
-}
-
void GFXTestSuite::setCustomColor(uint r, uint g, uint b) {
_palette[8] = r;
_palette[9] = g;
diff --git a/engines/testbed/graphics.h b/engines/testbed/graphics.h
index ad3eff301b..e26a0e8fc1 100644
--- a/engines/testbed/graphics.h
+++ b/engines/testbed/graphics.h
@@ -68,7 +68,12 @@ public:
*/
GFXTestSuite();
~GFXTestSuite() {}
- const char *getName() const;
+ const char *getName() const {
+ return "GFX";
+ }
+ const char *getDescription() const {
+ return "Graphics Subsystem";
+ }
static void setCustomColor(uint r, uint g, uint b);
private:
diff --git a/engines/testbed/misc.cpp b/engines/testbed/misc.cpp
index ffd3e2c537..632e4ca81f 100644
--- a/engines/testbed/misc.cpp
+++ b/engines/testbed/misc.cpp
@@ -150,8 +150,4 @@ MiscTestSuite::MiscTestSuite() {
addTest("Mutexes", &MiscTests::testMutexes, false);
}
-const char *MiscTestSuite::getName() const {
- return "Misc";
-}
-
} // End of namespace Testbed
diff --git a/engines/testbed/misc.h b/engines/testbed/misc.h
index 0c563e83c2..d1a9b48182 100644
--- a/engines/testbed/misc.h
+++ b/engines/testbed/misc.h
@@ -67,7 +67,12 @@ public:
*/
MiscTestSuite();
~MiscTestSuite() {}
- const char *getName() const;
+ const char *getName() const {
+ return "Misc";
+ }
+ const char *getDescription() const {
+ return "Miscellaneous: Timers/Mutexes/Datetime";
+ }
};
} // End of namespace Testbed
diff --git a/engines/testbed/savegame.cpp b/engines/testbed/savegame.cpp
index 6bd233e34f..af0eaa7bcd 100644
--- a/engines/testbed/savegame.cpp
+++ b/engines/testbed/savegame.cpp
@@ -196,8 +196,4 @@ SaveGameTestSuite::SaveGameTestSuite() {
addTest("Verify Error Messages", &SaveGametests::testErrorMessages, false);
}
-const char *SaveGameTestSuite::getName() const {
- return "SaveGames";
-}
-
} // End of namespace Testbed
diff --git a/engines/testbed/savegame.h b/engines/testbed/savegame.h
index 5ce27df6d2..98d630d237 100644
--- a/engines/testbed/savegame.h
+++ b/engines/testbed/savegame.h
@@ -56,7 +56,12 @@ public:
*/
SaveGameTestSuite();
~SaveGameTestSuite() {}
- const char *getName() const;
+ const char *getName() const {
+ return "SaveGames";
+ }
+ const char *getDescription() const {
+ return "Saving Game state tests";
+ }
};
} // End of namespace Testbed
diff --git a/engines/testbed/testsuite.h b/engines/testbed/testsuite.h
index cc9278cc4c..d8650915e0 100644
--- a/engines/testbed/testsuite.h
+++ b/engines/testbed/testsuite.h
@@ -122,6 +122,7 @@ public:
static uint parseEvents();
virtual const char *getName() const = 0;
+ virtual const char *getDescription() const = 0;
static void logPrintf(const char *s, ...) GCC_PRINTF(1, 2);
static void logDetailedPrintf(const char *s, ...) GCC_PRINTF(1, 2);