22#ifndef TESTBED_TESTSUITE_H
23#define TESTBED_TESTSUITE_H
25#include "common/array.h"
26#include "common/rect.h"
27#include "common/scummsys.h"
28#include "common/system.h"
29#include "common/str.h"
30#include "graphics/font.h"
32#include "graphics/fontman.h"
34#include "testbed/config-params.h"
55 kEventHandlingTime = 50
66 kWriteRGBColors = (1 << 0),
67 kWriteDrawFrame = (1 << 1)
70typedef TestExitStatus (*InvokingFunction)();
102 int getNumTestsSkipped()
const {
return _numTestsSkipped; }
104 void genReport()
const;
105 bool isEnabled()
const {
return _isTsEnabled; }
106 virtual void enable(
bool flag) {
121 static void displayMessage(
const Common::String &textToDisplay,
const char *defaultButton =
"OK");
124 static void clearEntireScreen() {
130 static void clearScreen();
131 static void clearScreen(
bool flag);
152 static uint parseEvents();
154 virtual const char *getName()
const = 0;
155 virtual const char *getDescription()
const = 0;
157 static void logPrintf(MSVC_PRINTF
const char *s, ...)
GCC_PRINTF(1, 2);
158 static
void logDetailedPrintf(MSVC_PRINTF const
char *s, ...)
GCC_PRINTF(1, 2);
174 pt.
y -= (
FontMan.getFontByUsage(ConfParams.getCurrentFontUsageType())->getFontHeight() * 3 + 15);
178 static uint getLineSeparation() {
179 return FontMan.getFontByUsage(ConfParams.getCurrentFontUsageType())->getFontHeight() + 5;
182 static void updateStats(
const char *prefix,
const char *info, uint numTests, uint testNum,
Common::Point pt);
184 int getNumTestsEnabled();
190 int _numTestsSkipped;
Definition: testsuite.h:96
static void static void static Common::Point getDisplayRegionCoordinates()
Definition: testsuite.h:169
void addTest(const Common::String &name, InvokingFunction f, bool isInteractive=true)
int _numTestsPassed
Number of tests passed.
Definition: testsuite.h:188
int _numTestsExecuted
Number of tests executed.
Definition: testsuite.h:189
virtual void prepare()
Definition: testsuite.h:145
static bool handleInteractiveInput(const Common::String &textToDisplay, const char *opt1="Yes", const char *opt2="No", OptionSelected result=kOptionLeft)
Common::Array< Test * > _testsToExecute
List of tests to be executed.
Definition: testsuite.h:187
int FORCEINLINE GCC_PRINTF(2, 0) int vsprintf_s(T(&dst)[N]
virtual int16 getWidth()=0
virtual int16 getHeight()=0
#define FontMan
Definition: fontman.h:135
Definition: algorithm.h:29
Definition: display_client.h:58
Definition: testsuite.h:76
bool enabled
Decides whether or not this test is to be executed.
Definition: testsuite.h:85
const Common::String featureName
Name of feature to be tested.
Definition: testsuite.h:83
bool passed
Collects and stores result of this feature test.
Definition: testsuite.h:86
InvokingFunction driver
Pointer to the function that will invoke this feature test.
Definition: testsuite.h:84
bool isInteractive
Decides if the test is interactive or not, An interactive testsuite may have non-interactive tests,...
Definition: testsuite.h:87