Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Added timeout to TestCaseReference.
Browse files Browse the repository at this point in the history
  • Loading branch information
mkauppila committed Jun 11, 2011
1 parent 06fb2e7 commit 1763e68
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
14 changes: 10 additions & 4 deletions test/test-automation/SDL_test.h
Expand Up @@ -35,10 +35,16 @@ extern int _testAssertsPassed;
* Holds information about a test case
*/
typedef struct TestCaseReference {
char *name; /*!< "Func2Stress" */
char *description; /*!< "This test beats the crap out of func2()" */
int enabled; /*!< Set to TEST_ENABLED or TEST_DISABLED */
long requirements; /*!< Set to TEST_REQUIRES_OPENGL, TEST_REQUIRES_AUDIO, ... */
/*!< "Func2Stress" */
char *name;
/*!< "This test beats the crap out of func2()" */
char *description;
/*!< Set to TEST_ENABLED or TEST_DISABLED */
int enabled;
/*!< Set to TEST_REQUIRES_OPENGL, TEST_REQUIRES_AUDIO, ... */
long requirements;
/*<! Timeout value in seconds. If exceeded runner will kill the test. 0 means infinite time */
long timeout;
} TestCaseReference;

/*! \fn _TestCaseInit
Expand Down
6 changes: 3 additions & 3 deletions test/test-automation/testdummy/testdummy.c
Expand Up @@ -37,13 +37,13 @@

/* Test case references */
static const TestCaseReference test1 =
(TestCaseReference){ "dummycase1", "description", TEST_ENABLED, 0 };
(TestCaseReference){ "dummycase1", "description", TEST_ENABLED, 0, 0};

static const TestCaseReference test2 =
(TestCaseReference){ "dummycase2", "description", TEST_ENABLED, 0 };
(TestCaseReference){ "dummycase2", "description", TEST_ENABLED, 0, 0};

static const TestCaseReference test3 =
(TestCaseReference){ "dummycase3", "description", TEST_ENABLED, 0 };
(TestCaseReference){ "dummycase3", "description", TEST_ENABLED, 0, 0};

/* Test suite */
extern const TestCaseReference *testSuite[] = {
Expand Down
2 changes: 1 addition & 1 deletion test/test-automation/testrect/testrect.c
Expand Up @@ -10,7 +10,7 @@

/* Test cases */
static const TestCaseReference test1 =
(TestCaseReference){ "rect_testIntersectRectAndLine", "description", TEST_ENABLED, 0 };
(TestCaseReference){ "rect_testIntersectRectAndLine", "description", TEST_ENABLED, 0, 0 };

/* Test suite */
extern const TestCaseReference *testSuite[] = {
Expand Down

0 comments on commit 1763e68

Please sign in to comment.