Added TestCaseReference structure.
This commit is contained in:
parent
d6d8dec05e
commit
ff1e17dca4
4 changed files with 38 additions and 11 deletions
|
@ -43,7 +43,7 @@ void
|
|||
AssertEquals(char *message, Uint32 expected, Uint32 actual)
|
||||
{
|
||||
if(expected != actual) {
|
||||
printf("\n===============================\n");
|
||||
printf("===============================\n");
|
||||
printf("Assert failed: %s\n", message);
|
||||
printf("Expected %d, got %d\n", expected, actual);
|
||||
printf("===============================\n");
|
||||
|
@ -51,4 +51,5 @@ AssertEquals(char *message, Uint32 expected, Uint32 actual)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
|
|
@ -23,6 +23,13 @@
|
|||
|
||||
#include <SDL/SDL.h>
|
||||
|
||||
typedef struct TestCaseReference {
|
||||
int enabled; /* Set to TEST_ENABLED or TEST_DISABLED */
|
||||
long requirements; /* Set to TEST_REQUIRES_OPENGL, TEST_REQUIRES_AUDIO, ... */
|
||||
char *name; /* "Func2Stress" */
|
||||
char *description; /* "This test beats the crap out of func2()" */
|
||||
} TestCaseReference;
|
||||
|
||||
void TestInit();
|
||||
void TestQuit();
|
||||
|
||||
|
|
|
@ -27,10 +27,22 @@
|
|||
|
||||
#include "SDL_test.h"
|
||||
|
||||
char *names[] = {"hello", "hello2", "hello3", NULL};
|
||||
/*
|
||||
TestCaseReference references[] = {
|
||||
{.name = "hello", .description = "desc", .enabled = 1, .requirements = 0 }
|
||||
};
|
||||
*/
|
||||
|
||||
char **queryTestNames() {
|
||||
return names;
|
||||
|
||||
TestCaseReference *references[] = {
|
||||
{"hello", "description", 1, 0},
|
||||
{"hello2", "description", 1, 0},
|
||||
NULL
|
||||
};
|
||||
|
||||
|
||||
TestCaseReference **QueryTestCaseReferences() {
|
||||
return references;
|
||||
}
|
||||
|
||||
void hello(void *arg){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue