#include <testsuite.h>
|
int | getNumTests () const |
|
int | getNumTestsPassed () const |
|
int | getNumTestsSkipped () const |
|
int | getNumTestsFailed () const |
|
void | genReport () const |
|
bool | isEnabled () const |
|
virtual void | enable (bool flag) |
|
bool | enableTest (const Common::String &testName, bool enable) |
|
void | reset () |
|
void | addTest (const Common::String &name, InvokingFunction f, bool isInteractive=true) |
|
virtual void | prepare () |
|
virtual void | execute () |
|
virtual const char * | getName () const =0 |
|
virtual const char * | getDescription () const =0 |
|
const Common::Array< Test * > & | getTestList () |
|
int | getNumTestsEnabled () |
|
|
static bool | handleInteractiveInput (const Common::String &textToDisplay, const char *opt1="Yes", const char *opt2="No", OptionSelected result=kOptionLeft) |
|
static void | displayMessage (const Common::String &textToDisplay, const char *defaultButton="OK") |
|
static Common::Rect | writeOnScreen (const Common::String &textToDisplay, const Common::Point &pt, bool flag=false) |
|
static void | clearScreen (const Common::Rect &rect) |
|
static void | clearEntireScreen () |
|
static void | clearScreen () |
|
static void | clearScreen (bool flag) |
|
static uint | parseEvents () |
|
static void | logPrintf (MSVC_PRINTF const char *s,...) GCC_PRINTF(1 |
|
static void static void | logDetailedPrintf (MSVC_PRINTF const char *s,...) GCC_PRINTF(1 |
|
static void static void static Common::Point | getDisplayRegionCoordinates () |
|
static uint | getLineSeparation () |
|
static void | updateStats (const char *prefix, const char *info, uint numTests, uint testNum, Common::Point pt) |
|
The basic Testsuite class All the other testsuites would inherit it and override its virtual methods
◆ handleInteractiveInput()
static bool Testbed::Testsuite::handleInteractiveInput |
( |
const Common::String & |
textToDisplay, |
|
|
const char * |
opt1 = "Yes" , |
|
|
const char * |
opt2 = "No" , |
|
|
OptionSelected |
result = kOptionLeft |
|
) |
| |
|
static |
Prompts for User Input in form of "Yes" or "No" for interactive tests e.g: "Is this like you expect?" "Yes" or "No"
- Parameters
-
textToDisplay | Display text |
- Returns
- true if "Yes" false otherwise
◆ addTest()
void Testbed::Testsuite::addTest |
( |
const Common::String & |
name, |
|
|
InvokingFunction |
f, |
|
|
bool |
isInteractive = true |
|
) |
| |
Adds a test to the list of tests to be executed
- Parameters
-
name | the string description of the test, for display purposes |
f | pointer to the function that invokes this test |
isInteractive | decides if the test is to be executed in interactive mode/ default true |
◆ prepare()
virtual void Testbed::Testsuite::prepare |
( |
| ) |
|
|
inlinevirtual |
◆ execute()
virtual void Testbed::Testsuite::execute |
( |
| ) |
|
|
virtual |
The driver function for the testsuite All code should go in here.
◆ getDisplayRegionCoordinates()
static void static void static Common::Point Testbed::Testsuite::getDisplayRegionCoordinates |
( |
| ) |
|
|
inlinestatic |
Display region is in the bottom. Probably 1/4th of the game screen. It contains: 1) Information about executing testsuite. 2) Total progress within this testsuite. 3) Total overall progress in the number of testsuites
The documentation for this class was generated from the following file: