My Project
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Classes | Macros | Typedefs | Functions
SDL_test_harness.h File Reference
#include "begin_code.h"
#include "close_code.h"

Go to the source code of this file.

Classes

struct  SDLTest_TestCaseReference
 
struct  SDLTest_TestSuiteReference
 

Macros

#define TEST_ENABLED   1
 
#define TEST_DISABLED   0
 
#define TEST_ABORTED   -1
 
#define TEST_STARTED   0
 
#define TEST_COMPLETED   1
 
#define TEST_SKIPPED   2
 
#define TEST_RESULT_PASSED   0
 
#define TEST_RESULT_FAILED   1
 
#define TEST_RESULT_NO_ASSERT   2
 
#define TEST_RESULT_SKIPPED   3
 
#define TEST_RESULT_SETUP_FAILURE   4
 

Typedefs

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
 

Functions

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. More...
 

Detailed Description

Include file for SDL test framework.

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

Typedef Documentation

Holds information about a single test case.

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

Function Documentation

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.

Parameters
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.
Returns
Test run result; 0 when all tests passed, 1 if any tests failed.