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

Function main

test/browser/test_sdl2_image.c:56–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54}
55
56int main() {
57 SDL_Init(SDL_INIT_VIDEO);
58
59 SDL_Window *window;
60 SDL_Renderer *renderer;
61
62 SDL_CreateWindowAndRenderer(600, 450, 0, &window, &renderer);
63
64 int result = 0;
65
66 result = testImage(renderer, SCREENSHOT_DIRNAME "/" SCREENSHOT_BASENAME); // absolute path
67 assert(result != 0);
68
69 chdir(SCREENSHOT_DIRNAME);
70 result = testImage(renderer, "./" SCREENSHOT_BASENAME); // relative path
71 assert(result != 0);
72
73 SDL_RenderPresent(renderer);
74
75 printf("you should see an image.\n");
76
77 return result;
78}

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