include/SDL_test_harness.h
changeset 7191 75360622e65f
parent 7189 414be1d64060
child 7663 53fe1b64eb2d
     1.1 --- a/include/SDL_test_harness.h	Sat May 18 12:48:50 2013 -0700
     1.2 +++ b/include/SDL_test_harness.h	Sat May 18 14:17:52 2013 -0700
     1.3 @@ -21,7 +21,7 @@
     1.4  
     1.5  /**
     1.6   *  \file SDL_test_harness.h
     1.7 - *  
     1.8 + *
     1.9   *  Include file for SDL test framework.
    1.10   *
    1.11   *  This code is a part of the SDL2_test library, not the main SDL library.
    1.12 @@ -29,7 +29,7 @@
    1.13  
    1.14  /*
    1.15    Defines types for test case definitions and the test execution harness API.
    1.16 -  
    1.17 +
    1.18    Based on original GSOC code by Markus Kauppila <markus.kauppila@gmail.com>
    1.19  */
    1.20  
    1.21 @@ -39,9 +39,7 @@
    1.22  #include "begin_code.h"
    1.23  /* Set up for C function definitions, even when using C++ */
    1.24  #ifdef __cplusplus
    1.25 -/* *INDENT-OFF* */
    1.26  extern "C" {
    1.27 -/* *INDENT-ON* */
    1.28  #endif
    1.29  
    1.30  
    1.31 @@ -50,17 +48,17 @@
    1.32  #define TEST_DISABLED 0
    1.33  
    1.34  //! Definition of all the possible test return values of the test case method
    1.35 -#define TEST_ABORTED		-1
    1.36 -#define TEST_STARTED		 0
    1.37 -#define TEST_COMPLETED		 1
    1.38 -#define TEST_SKIPPED		 2
    1.39 +#define TEST_ABORTED        -1
    1.40 +#define TEST_STARTED         0
    1.41 +#define TEST_COMPLETED       1
    1.42 +#define TEST_SKIPPED         2
    1.43  
    1.44  //! Definition of all the possible test results for the harness
    1.45 -#define TEST_RESULT_PASSED				0
    1.46 -#define TEST_RESULT_FAILED				1
    1.47 -#define TEST_RESULT_NO_ASSERT			2
    1.48 -#define TEST_RESULT_SKIPPED				3
    1.49 -#define TEST_RESULT_SETUP_FAILURE		4
    1.50 +#define TEST_RESULT_PASSED              0
    1.51 +#define TEST_RESULT_FAILED              1
    1.52 +#define TEST_RESULT_NO_ASSERT           2
    1.53 +#define TEST_RESULT_SKIPPED             3
    1.54 +#define TEST_RESULT_SETUP_FAILURE       4
    1.55  
    1.56  //!< Function pointer to a test case setup function (run before every test)
    1.57  typedef void (*SDLTest_TestCaseSetUpFp)(void *arg);
    1.58 @@ -75,28 +73,28 @@
    1.59   * Holds information about a single test case.
    1.60   */
    1.61  typedef struct SDLTest_TestCaseReference {
    1.62 -	/*!< Func2Stress */
    1.63 -	SDLTest_TestCaseFp testCase;
    1.64 -	/*!< Short name (or function name) "Func2Stress" */
    1.65 -	char *name;
    1.66 -	/*!< Long name or full description "This test pushes func2() to the limit." */
    1.67 -	char *description;
    1.68 -	/*!< Set to TEST_ENABLED or TEST_DISABLED (test won't be run) */
    1.69 -	int enabled;
    1.70 +    /*!< Func2Stress */
    1.71 +    SDLTest_TestCaseFp testCase;
    1.72 +    /*!< Short name (or function name) "Func2Stress" */
    1.73 +    char *name;
    1.74 +    /*!< Long name or full description "This test pushes func2() to the limit." */
    1.75 +    char *description;
    1.76 +    /*!< Set to TEST_ENABLED or TEST_DISABLED (test won't be run) */
    1.77 +    int enabled;
    1.78  } SDLTest_TestCaseReference;
    1.79  
    1.80  /**
    1.81   * Holds information about a test suite (multiple test cases).
    1.82   */
    1.83  typedef struct SDLTest_TestSuiteReference {
    1.84 -	/*!< "PlatformSuite" */
    1.85 -	char *name;
    1.86 -	/*!< The function that is run before each test. NULL skips. */
    1.87 -	SDLTest_TestCaseSetUpFp testSetUp;
    1.88 -	/*!< The test cases that are run as part of the suite. Last item should be NULL. */
    1.89 -	const SDLTest_TestCaseReference **testCases;
    1.90 -	/*!< The function that is run after each test. NULL skips. */
    1.91 -	SDLTest_TestCaseTearDownFp testTearDown;
    1.92 +    /*!< "PlatformSuite" */
    1.93 +    char *name;
    1.94 +    /*!< The function that is run before each test. NULL skips. */
    1.95 +    SDLTest_TestCaseSetUpFp testSetUp;
    1.96 +    /*!< The test cases that are run as part of the suite. Last item should be NULL. */
    1.97 +    const SDLTest_TestCaseReference **testCases;
    1.98 +    /*!< The function that is run after each test. NULL skips. */
    1.99 +    SDLTest_TestCaseTearDownFp testTearDown;
   1.100  } SDLTest_TestSuiteReference;
   1.101  
   1.102  
   1.103 @@ -112,13 +110,11 @@
   1.104   * \returns Test run result; 0 when all tests passed, 1 if any tests failed.
   1.105   */
   1.106  int SDLTest_RunSuites(SDLTest_TestSuiteReference *testSuites[], const char *userRunSeed, Uint64 userExecKey, const char *filter, int testIterations);
   1.107 -         
   1.108 +
   1.109  
   1.110  /* Ends C function definitions when using C++ */
   1.111  #ifdef __cplusplus
   1.112 -/* *INDENT-OFF* */
   1.113  }
   1.114 -/* *INDENT-ON* */
   1.115  #endif
   1.116  #include "close_code.h"
   1.117