Welcome to mirror list, hosted at ThFree Co, Russian Federation.

SDL_test_harness.h « SDL2 « include « sdlew « extern - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 4ec6dc45a815626118527adecdb8f2850323ddea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67

#ifndef _SDL_test_harness_h
#define _SDL_test_harness_h

#include "begin_code.h"

#ifdef __cplusplus
extern "C" {
#endif

//! Definitions for test case structures
#define TEST_ENABLED  1
#define TEST_DISABLED 0

//! Definition of all the possible test return values of the test case method
#define TEST_ABORTED        -1
#define TEST_STARTED         0
#define TEST_COMPLETED       1
#define TEST_SKIPPED         2

//! Definition of all the possible test results for the harness
#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

//!< Function pointer to a test case setup function (run before every test)
typedef void (*SDLTest_TestCaseSetUpFp)(void *arg);

//!< Function pointer to a test case function
typedef int (*SDLTest_TestCaseFp)(void *arg);

//!< Function pointer to a test case teardown function (run after every test)
typedef void  (*SDLTest_TestCaseTearDownFp)(void *arg);

typedef struct SDLTest_TestCaseReference {

    SDLTest_TestCaseFp testCase;

    char *name;

    char *description;

    int enabled;
} SDLTest_TestCaseReference;

typedef struct SDLTest_TestSuiteReference {

    char *name;

    SDLTest_TestCaseSetUpFp testSetUp;

    const SDLTest_TestCaseReference **testCases;

    SDLTest_TestCaseTearDownFp testTearDown;
} SDLTest_TestSuiteReference;

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

#ifdef __cplusplus
}
#endif
#include "close_code.h"

#endif