aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-05-05 18:05:42 -0700
committerAlon Zakai <alonzakai@gmail.com>2012-05-05 18:05:42 -0700
commit642819024e8bef56119d37a34394bf85397d777c (patch)
tree2b19918faeb5508cbb220d788b4a88cec113e9aa /tests
parentd24edd5719c6156fc3223cf4cd4e4e2b9fc3a171 (diff)
refactor gl code for closure compiler, and add more testing
Diffstat (limited to 'tests')
-rwxr-xr-xtests/runner.py4
-rw-r--r--tests/sdl_ogl.c1
2 files changed, 3 insertions, 2 deletions
diff --git a/tests/runner.py b/tests/runner.py
index 8ce18a34..01ae704e 100755
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -7132,10 +7132,10 @@ elif 'browser' in str(sys.argv):
self.run_browser('something.html', '.', '/report_result?1')
def test_sdl_ogl(self):
- # SDL, OpenGL, textures, immediate mode
+ # SDL, OpenGL, textures, immediate mode. Closure for more coverage
shutil.copyfile(path_from_root('tests', 'screenshot.png'), os.path.join(self.get_dir(), 'screenshot.png'))
self.reftest(path_from_root('tests', 'screenshot-gray-purple.png'))
- Popen(['python', EMCC, path_from_root('tests', 'sdl_ogl.c'), '-o', 'something.html', '--pre-js', 'reftest.js', '--preload-file', 'screenshot.png']).communicate()
+ Popen(['python', EMCC, path_from_root('tests', 'sdl_ogl.c'), '-O2', '--minify', '0', '-o', 'something.html', '--pre-js', 'reftest.js', '--preload-file', 'screenshot.png']).communicate()
self.run_browser('something.html', 'You should see an image with gray at the top.', '/report_result?0')
def test_sdl_ogl_p(self):
diff --git a/tests/sdl_ogl.c b/tests/sdl_ogl.c
index 2165ed64..570a0e10 100644
--- a/tests/sdl_ogl.c
+++ b/tests/sdl_ogl.c
@@ -58,6 +58,7 @@ int main(int argc, char *argv[])
glViewport( 0, 0, 640, 480 );
glMatrixMode( GL_PROJECTION );
+ glPushMatrix(); // just for testing
glLoadIdentity();
glOrtho( 0, 640, 480, 0, -1, 1 );