MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / main

Function main

test/browser/test_sdl_image.c:45–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43}
44
45int main() {
46 SDL_Init(SDL_INIT_VIDEO);
47 SDL_Surface *screen = SDL_SetVideoMode(600, 450, 32, SDL_SWSURFACE);
48
49 int result;
50
51 result = testImage(screen, SCREENSHOT_DIRNAME "/" SCREENSHOT_BASENAME); // absolute path
52 assert(result == 600);
53
54 chdir(SCREENSHOT_DIRNAME);
55 result = testImage(screen, "./" SCREENSHOT_BASENAME); // relative path
56 assert(result == 600);
57
58 SDL_Flip(screen);
59
60 printf("you should see an image.\n");
61
62 SDL_Quit();
63 return 0;
64}
65

Callers

nothing calls this directly

Calls 4

printfFunction · 0.85
testImageFunction · 0.70
assertFunction · 0.50
chdirFunction · 0.50

Tested by

no test coverage detected