diff options
Diffstat (limited to 'tests/emscripten_api_browser.cpp')
-rw-r--r-- | tests/emscripten_api_browser.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/emscripten_api_browser.cpp b/tests/emscripten_api_browser.cpp index 37ffbdd6..4d425120 100644 --- a/tests/emscripten_api_browser.cpp +++ b/tests/emscripten_api_browser.cpp @@ -1,5 +1,6 @@ #include<stdio.h> #include<math.h> +#include<stdlib.h> #include<SDL.h> #include<emscripten.h> #include<assert.h> @@ -26,11 +27,18 @@ void second() { } +void never() { + int result = 0; + REPORT_RESULT(); +} + int main() { SDL_Init(0); last = SDL_GetTicks(); printf("frist! %d\n", last); + atexit(never); // should never be called - it is wrong to exit the runtime orderly if we have async calls! + emscripten_async_call(second, 500); return 1; |