aboutsummaryrefslogtreecommitdiff
path: root/tests/sdl_canvas_proxy.c
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-09-08 20:00:28 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-09-08 20:00:28 -0700
commit07151505da3206bd23101f25d05aba185e83c836 (patch)
tree953c1ff3323171ef5ead77fb5f6c2944686f456c /tests/sdl_canvas_proxy.c
parent2d0bd0061a4e57f999cf5c4bd537ffd8a2a0cdba (diff)
test file preloading in worker
Diffstat (limited to 'tests/sdl_canvas_proxy.c')
-rw-r--r--tests/sdl_canvas_proxy.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/sdl_canvas_proxy.c b/tests/sdl_canvas_proxy.c
index 2b33be29..27ef3bb4 100644
--- a/tests/sdl_canvas_proxy.c
+++ b/tests/sdl_canvas_proxy.c
@@ -1,9 +1,19 @@
#include <stdio.h>
#include <stdlib.h>
#include <SDL/SDL.h>
+#include <assert.h>
#include <emscripten.h>
int main(int argc, char **argv) {
+ FILE *f = fopen("data.txt", "rb");
+ assert(f);
+ assert(fgetc(f) == 'd');
+ assert(fgetc(f) == 'a');
+ assert(fgetc(f) == 't');
+ assert(fgetc(f) == 'u');
+ assert(fgetc(f) == 'm');
+ fclose(f);
+
SDL_Init(SDL_INIT_VIDEO);
SDL_Surface *screen = SDL_SetVideoMode(600, 450, 32, SDL_HWSURFACE);