Commit 481c64b2 authored by Markus Kauppila's avatar Markus Kauppila

Added timeout to TestCaseReference.

parent 3c395336
...@@ -35,10 +35,16 @@ extern int _testAssertsPassed; ...@@ -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
......
...@@ -37,13 +37,13 @@ ...@@ -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[] = {
......
...@@ -10,7 +10,7 @@ ...@@ -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[] = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment