zenilib
0.5.3.0
|
Go to the source code of this file.
Classes | |
struct | SDLTest_TestCaseReference |
struct | SDLTest_TestSuiteReference |
Macros | |
#define | TEST_ABORTED -1 |
#define | TEST_COMPLETED 1 |
#define | TEST_DISABLED 0 |
#define | TEST_ENABLED 1 |
#define | TEST_RESULT_FAILED 1 |
#define | TEST_RESULT_NO_ASSERT 2 |
#define | TEST_RESULT_PASSED 0 |
#define | TEST_RESULT_SETUP_FAILURE 4 |
#define | TEST_RESULT_SKIPPED 3 |
#define | TEST_SKIPPED 2 |
#define | TEST_STARTED 0 |
Typedefs | |
typedef int(* | SDLTest_TestCaseFp )(void *arg) |
typedef struct SDLTest_TestCaseReference | SDLTest_TestCaseReference |
typedef void(* | SDLTest_TestCaseSetUpFp )(void *arg) |
typedef void(* | SDLTest_TestCaseTearDownFp )(void *arg) |
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... | |
Include file for SDL test framework.
This code is a part of the SDL2_test library, not the main SDL library.
Definition in file SDL_test_harness.h.
#define TEST_ABORTED -1 |
Definition at line 51 of file SDL_test_harness.h.
Referenced by SDLTest_BailOut(), and SDLTest_RunTest().
#define TEST_COMPLETED 1 |
Definition at line 53 of file SDL_test_harness.h.
#define TEST_DISABLED 0 |
Definition at line 48 of file SDL_test_harness.h.
#define TEST_ENABLED 1 |
Definition at line 47 of file SDL_test_harness.h.
#define TEST_RESULT_FAILED 1 |
Definition at line 58 of file SDL_test_harness.h.
Referenced by SDLTest_AssertSummaryToTestResult(), SDLTest_RunSuites(), and SDLTest_RunTest().
#define TEST_RESULT_NO_ASSERT 2 |
Definition at line 59 of file SDL_test_harness.h.
Referenced by SDLTest_AssertSummaryToTestResult(), and SDLTest_RunSuites().
#define TEST_RESULT_PASSED 0 |
Definition at line 57 of file SDL_test_harness.h.
Referenced by SDLTest_AssertSummaryToTestResult(), and SDLTest_RunSuites().
#define TEST_RESULT_SETUP_FAILURE 4 |
Definition at line 61 of file SDL_test_harness.h.
Referenced by SDLTest_RunTest().
#define TEST_RESULT_SKIPPED 3 |
Definition at line 60 of file SDL_test_harness.h.
Referenced by SDLTest_RunSuites(), and SDLTest_RunTest().
#define TEST_SKIPPED 2 |
Definition at line 54 of file SDL_test_harness.h.
Referenced by SDLTest_RunTest().
#define TEST_STARTED 0 |
Definition at line 52 of file SDL_test_harness.h.
Referenced by SDLTest_RunTest().
Definition at line 67 of file SDL_test_harness.h.
typedef struct SDLTest_TestCaseReference SDLTest_TestCaseReference |
Holds information about a single test case.
Definition at line 64 of file SDL_test_harness.h.
Definition at line 70 of file SDL_test_harness.h.
typedef struct SDLTest_TestSuiteReference SDLTest_TestSuiteReference |
Holds information about a test suite (multiple test cases).
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.
testSuites | Suites containing the test case. |
userRunSeed | Custom run seed provided by user, or NULL to autogenerate one. |
userExecKey | Custom execution key provided by user, or 0 to autogenerate one. |
filter | Filter specification. NULL disables. Case sensitive. |
testIterations | Number of iterations to run each test case. |
Execute a test suite using the given run seed and execution key.
The filter string is matched to the suite name (full comparison) to select a single suite, or if no suite matches, it is matched to the test names (full comparison) to select a single test.
testSuites | Suites containing the test case. |
userRunSeed | Custom run seed provided by user, or NULL to autogenerate one. |
userExecKey | Custom execution key provided by user, or 0 to autogenerate one. |
filter | Filter specification. NULL disables. Case sensitive. |
testIterations | Number of iterations to run each test case. |
Definition at line 363 of file SDL_test_harness.c.
References SDLTest_TestCaseReference::description, SDLTest_TestCaseReference::enabled, GetClock(), if(), SDLTest_TestCaseReference::name, SDLTest_TestSuiteReference::name, NULL, SDL_strcmp(), SDLTest_FinalResultFormat, SDLTest_GenerateExecKey(), SDLTest_GenerateRunSeed(), SDLTest_InvalidNameFormat, SDLTest_Log(), SDLTest_LogError(), SDLTest_LogSummaryFormat, SDLTest_RunTest(), TEST_RESULT_FAILED, TEST_RESULT_NO_ASSERT, TEST_RESULT_PASSED, TEST_RESULT_SKIPPED, and SDLTest_TestSuiteReference::testCases.