Added timeout to TestCaseReference.

This commit is contained in:
Markus Kauppila 2011-06-11 21:37:28 +03:00
parent 3c3953361f
commit 481c64b262
3 changed files with 14 additions and 8 deletions

View file

@ -35,10 +35,16 @@ extern int _testAssertsPassed;
* Holds information about a test case * Holds information about a test case
*/ */
typedef struct TestCaseReference { typedef struct TestCaseReference {
char *name; /*!< "Func2Stress" */ /*!< "Func2Stress" */
char *description; /*!< "This test beats the crap out of func2()" */ char *name;
int enabled; /*!< Set to TEST_ENABLED or TEST_DISABLED */ /*!< "This test beats the crap out of func2()" */
long requirements; /*!< Set to TEST_REQUIRES_OPENGL, TEST_REQUIRES_AUDIO, ... */ 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; } TestCaseReference;
/*! \fn _TestCaseInit /*! \fn _TestCaseInit

View file

@ -37,13 +37,13 @@
/* Test case references */ /* Test case references */
static const TestCaseReference test1 = static const TestCaseReference test1 =
(TestCaseReference){ "dummycase1", "description", TEST_ENABLED, 0 }; (TestCaseReference){ "dummycase1", "description", TEST_ENABLED, 0, 0};
static const TestCaseReference test2 = static const TestCaseReference test2 =
(TestCaseReference){ "dummycase2", "description", TEST_ENABLED, 0 }; (TestCaseReference){ "dummycase2", "description", TEST_ENABLED, 0, 0};
static const TestCaseReference test3 = static const TestCaseReference test3 =
(TestCaseReference){ "dummycase3", "description", TEST_ENABLED, 0 }; (TestCaseReference){ "dummycase3", "description", TEST_ENABLED, 0, 0};
/* Test suite */ /* Test suite */
extern const TestCaseReference *testSuite[] = { extern const TestCaseReference *testSuite[] = {

View file

@ -10,7 +10,7 @@
/* Test cases */ /* Test cases */
static const TestCaseReference test1 = static const TestCaseReference test1 =
(TestCaseReference){ "rect_testIntersectRectAndLine", "description", TEST_ENABLED, 0 }; (TestCaseReference){ "rect_testIntersectRectAndLine", "description", TEST_ENABLED, 0, 0 };
/* Test suite */ /* Test suite */
extern const TestCaseReference *testSuite[] = { extern const TestCaseReference *testSuite[] = {