diff options
author | Sam Lantinga <slouken@libsdl.org> | 2012-12-31 10:26:38 -0800 |
---|---|---|
committer | Sam Lantinga <slouken@libsdl.org> | 2012-12-31 10:26:38 -0800 |
commit | ffbbd3a64a745e805faa95208e788b1654f2bb0e (patch) | |
tree | 0bbafa411332e99764dadaa32e7a6134d2a794b7 /test/testwm2.c | |
parent | c1a0b51e0b8d08af2ad4bd22b68fc093ca14ec12 (diff) |
Switched the test code over to use the common functions in the test library.
Diffstat (limited to 'test/testwm2.c')
-rw-r--r-- | test/testwm2.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/test/testwm2.c b/test/testwm2.c index 366e86f38c..75de8f9bf0 100644 --- a/test/testwm2.c +++ b/test/testwm2.c @@ -13,15 +13,15 @@ #include <stdlib.h> #include <stdio.h> -#include "common.h" +#include "SDL_test_common.h" -static CommonState *state; +static SDLTest_CommonState *state; /* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */ static void quit(int rc) { - CommonQuit(state); + SDLTest_CommonQuit(state); exit(rc); } @@ -50,7 +50,7 @@ main(int argc, char *argv[]) SDL_Cursor *cursor = NULL; /* Initialize test framework */ - state = CommonCreateState(argv, SDL_INIT_VIDEO); + state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO); if (!state) { return 1; } @@ -58,17 +58,17 @@ main(int argc, char *argv[]) for (i = 1; i < argc;) { int consumed; - consumed = CommonArg(state, i); + consumed = SDLTest_CommonArg(state, i); if (consumed == 0) { consumed = -1; } if (consumed < 0) { - fprintf(stderr, "Usage: %s %s\n", argv[0], CommonUsage(state)); + fprintf(stderr, "Usage: %s %s\n", argv[0], SDLTest_CommonUsage(state)); quit(1); } i += consumed; } - if (!CommonInit(state)) { + if (!SDLTest_CommonInit(state)) { quit(2); } @@ -77,7 +77,7 @@ main(int argc, char *argv[]) while (!done) { /* Check for events */ while (SDL_PollEvent(&event)) { - CommonEvent(state, &event, &done); + SDLTest_CommonEvent(state, &event, &done); if (event.type == SDL_WINDOWEVENT) { if (event.window.event == SDL_WINDOWEVENT_MOVED) { |