World of Might and Magic  0.2.0
Open reimplementation of Might and Magic 6 7 8 game engine
Файл SDL_test_harness.h

См. исходные тексты.

Классы

struct  SDLTest_TestCaseReference
 
struct  SDLTest_TestSuiteReference
 

Определения типов

typedef void(* SDLTest_TestCaseSetUpFp) (void *arg)
 
typedef int(* SDLTest_TestCaseFp) (void *arg)
 
typedef void(* SDLTest_TestCaseTearDownFp) (void *arg)
 
typedef struct SDLTest_TestCaseReference SDLTest_TestCaseReference
 
typedef struct SDLTest_TestSuiteReference SDLTest_TestSuiteReference
 

Функции

char * SDLTest_GenerateRunSeed (const int length)
 Generates a random run seed string for the harness. The generated seed will contain alphanumeric characters (0-9A-Z). Подробнее...
 
int SDLTest_RunSuites (SDLTest_TestSuiteReference *testSuites[], const char *userRunSeed, Uint64 userExecKey, const char *filter, int testIterations)
 Execute a test suite using the given run seed and execution key. Подробнее...
 

Подробное описание

Include file for SDL test framework.

This code is a part of the SDL2_test library, not the main SDL library.

См. определение в файле SDL_test_harness.h

Типы

◆ SDLTest_TestCaseSetUpFp

typedef void(* SDLTest_TestCaseSetUpFp) (void *arg)

См. определение в файле SDL_test_harness.h строка 64

◆ SDLTest_TestCaseFp

typedef int(* SDLTest_TestCaseFp) (void *arg)

См. определение в файле SDL_test_harness.h строка 67

◆ SDLTest_TestCaseTearDownFp

typedef void(* SDLTest_TestCaseTearDownFp) (void *arg)

См. определение в файле SDL_test_harness.h строка 70

◆ SDLTest_TestCaseReference

Holds information about a single test case.

◆ SDLTest_TestSuiteReference

Holds information about a test suite (multiple test cases).

Функции

◆ SDLTest_GenerateRunSeed()

char* SDLTest_GenerateRunSeed ( const int  length)

Generates a random run seed string for the harness. The generated seed will contain alphanumeric characters (0-9A-Z).

Note: The returned string needs to be deallocated by the caller.

Аргументы
lengthThe length of the seed string to generate
Возвращает
The generated seed string

◆ SDLTest_RunSuites()

int SDLTest_RunSuites ( SDLTest_TestSuiteReference testSuites[],
const char *  userRunSeed,
Uint64  userExecKey,
const char *  filter,
int  testIterations 
)

Execute a test suite using the given run seed and execution key.

Аргументы
testSuitesSuites containing the test case.
userRunSeedCustom run seed provided by user, or NULL to autogenerate one.
userExecKeyCustom execution key provided by user, or 0 to autogenerate one.
filterFilter specification. NULL disables. Case sensitive.
testIterationsNumber of iterations to run each test case.
Возвращает
Test run result; 0 when all tests passed, 1 if any tests failed.