| 123456789101112131415161718192021222324252627 |
- MODULE test_init ;
- (*
- m2SDL smoke test: SDL_Init(SDLInitTimer) / SDL_Quit round-trip
- plus SDL_WasInit mask check. Exit code 0 = pass, 1 = fail.
- *)
- FROM SDL2 IMPORT SDL_Init, SDL_Quit, SDL_WasInit, SDLInitTimer;
- FROM libc IMPORT printf;
- VAR rc: INTEGER; mask: CARDINAL;
- BEGIN
- rc := SDL_Init(SDLInitTimer);
- IF rc # 0 THEN
- printf("FAIL test_init: SDL_Init returned %d\n", rc);
- HALT(1)
- END;
- mask := SDL_WasInit(SDLInitTimer);
- IF mask = 0 THEN
- printf("FAIL test_init: SDL_WasInit mask is 0\n");
- SDL_Quit;
- HALT(1)
- END;
- SDL_Quit;
- printf("PASS test_init (wasInit=%u)\n", mask)
- END test_init.
|