mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-25 13:42:37 +00:00
Some more improvements in the TestbedListWidget and added description method in testsuite class
svn-id: r50984
This commit is contained in:
parent
07a9a03587
commit
b6c2be3bb9
@ -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();
|
||||
|
@ -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;
|
||||
};
|
||||
|
@ -238,8 +238,4 @@ EventTestSuite::EventTestSuite() {
|
||||
addTest("Mainmenu Event", &EventTests::showMainMenu);
|
||||
}
|
||||
|
||||
const char *EventTestSuite::getName() const {
|
||||
return "Events";
|
||||
}
|
||||
|
||||
} // End of namespace Testbed
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
};
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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:
|
||||
|
@ -150,8 +150,4 @@ MiscTestSuite::MiscTestSuite() {
|
||||
addTest("Mutexes", &MiscTests::testMutexes, false);
|
||||
}
|
||||
|
||||
const char *MiscTestSuite::getName() const {
|
||||
return "Misc";
|
||||
}
|
||||
|
||||
} // End of namespace Testbed
|
||||
|
@ -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
|
||||
|
@ -196,8 +196,4 @@ SaveGameTestSuite::SaveGameTestSuite() {
|
||||
addTest("Verify Error Messages", &SaveGametests::testErrorMessages, false);
|
||||
}
|
||||
|
||||
const char *SaveGameTestSuite::getName() const {
|
||||
return "SaveGames";
|
||||
}
|
||||
|
||||
} // End of namespace Testbed
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user