2010-06-26 13:07:13 +00:00
|
|
|
/* ScummVM - Graphic Adventure Engine
|
|
|
|
*
|
|
|
|
* ScummVM is the legal property of its developers, whose names
|
|
|
|
* are too numerous to list here. Please refer to the COPYRIGHT
|
|
|
|
* file distributed with this source distribution.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
*/
|
|
|
|
|
2010-05-31 04:58:19 +00:00
|
|
|
#ifndef TESTBED_H
|
|
|
|
#define TESTBED_H
|
2010-07-14 14:12:42 +00:00
|
|
|
|
2011-04-24 11:34:27 +03:00
|
|
|
#include "common/array.h"
|
2010-07-01 12:30:56 +00:00
|
|
|
|
2011-04-24 11:34:27 +03:00
|
|
|
#include "engines/engine.h"
|
2010-07-13 19:26:45 +00:00
|
|
|
|
2010-07-30 13:54:25 +00:00
|
|
|
#include "testbed/config.h"
|
2010-07-01 12:30:56 +00:00
|
|
|
#include "testbed/testsuite.h"
|
|
|
|
|
2010-05-31 04:58:19 +00:00
|
|
|
namespace Testbed {
|
2010-06-29 22:46:56 +00:00
|
|
|
|
2010-07-27 09:32:19 +00:00
|
|
|
class TestbedConfigManager;
|
|
|
|
|
2010-06-29 22:46:56 +00:00
|
|
|
enum {
|
|
|
|
kTestbedLogOutput = 1 << 0,
|
2010-08-14 08:32:39 +00:00
|
|
|
kTestbedEngineDebug = 1 << 2,
|
2010-07-30 13:54:25 +00:00
|
|
|
kCmdRerunTestbed = 'crtb'
|
2010-06-29 22:46:56 +00:00
|
|
|
};
|
|
|
|
|
2010-05-31 04:58:19 +00:00
|
|
|
class TestbedEngine : public Engine {
|
2010-05-24 17:43:55 +00:00
|
|
|
public:
|
2010-05-31 04:58:19 +00:00
|
|
|
TestbedEngine(OSystem *syst);
|
|
|
|
~TestbedEngine();
|
2010-07-14 14:12:42 +00:00
|
|
|
|
2010-05-24 17:43:55 +00:00
|
|
|
virtual Common::Error run();
|
2010-07-14 14:12:42 +00:00
|
|
|
|
2010-07-01 12:30:56 +00:00
|
|
|
/**
|
|
|
|
* Invokes configured testsuites.
|
|
|
|
*/
|
2010-07-27 09:32:19 +00:00
|
|
|
void invokeTestsuites(TestbedConfigManager &cfMan);
|
2010-07-01 12:30:56 +00:00
|
|
|
|
2010-07-05 21:29:15 +00:00
|
|
|
bool hasFeature(EngineFeature f) const;
|
2010-08-14 08:32:39 +00:00
|
|
|
|
2010-07-01 12:30:56 +00:00
|
|
|
private:
|
2010-07-13 19:26:45 +00:00
|
|
|
Common::Array<Testsuite *> _testsuiteList;
|
|
|
|
};
|
|
|
|
|
2010-07-30 13:54:25 +00:00
|
|
|
class TestbedExitDialog : public TestbedInteractionDialog {
|
|
|
|
public:
|
2010-08-09 20:10:53 +00:00
|
|
|
TestbedExitDialog(Common::Array<Testsuite *> &testsuiteList) : TestbedInteractionDialog(80, 40, 500, 330),
|
2010-08-01 23:26:38 +00:00
|
|
|
_testsuiteList(testsuiteList) {}
|
2010-07-30 13:54:25 +00:00
|
|
|
~TestbedExitDialog() {}
|
2010-08-01 23:26:38 +00:00
|
|
|
void init();
|
2010-07-30 13:54:25 +00:00
|
|
|
void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data);
|
|
|
|
void run() { runModal(); }
|
|
|
|
private:
|
2010-08-01 23:26:38 +00:00
|
|
|
Common::Array<Testsuite *> &_testsuiteList;
|
2010-07-30 13:54:25 +00:00
|
|
|
};
|
|
|
|
|
2010-05-31 04:58:19 +00:00
|
|
|
} // End of namespace Testbed
|
2010-07-14 14:12:42 +00:00
|
|
|
|
2010-07-14 19:44:51 +00:00
|
|
|
#endif // TESTBED_H
|