diff options
author | Michael Bishop <mbtyke@gmail.com> | 2013-03-01 13:49:13 -0500 |
---|---|---|
committer | Michael Bishop <mbtyke@gmail.com> | 2013-03-08 17:26:18 -0500 |
commit | 404380d16573f326cd04363dd926cdd303662dc6 (patch) | |
tree | 4a261f9162dc673dcf7fadeba2d758ce16133d40 /tests/runner.py | |
parent | 03c82a1c25d6551675d3191810eecd628df04b3c (diff) |
Added test that tests the basic functionality of SDL_Mixer including pausing and resuming both the Sound channels and Music channel.
Diffstat (limited to 'tests/runner.py')
-rwxr-xr-x | tests/runner.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/runner.py b/tests/runner.py index cdc8684b..fce374c8 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -10633,6 +10633,15 @@ elif 'browser' in str(sys.argv): Popen([PYTHON, EMCC, '-O2', '--minify', '0', os.path.join(self.get_dir(), 'sdl_audio.c'), '--preload-file', 'sound.ogg', '--preload-file', 'sound2.wav', '--preload-file', 'bad.ogg', '-o', 'page.html', '-s', 'EXPORTED_FUNCTIONS=["_main", "_play", "_play2"]']).communicate() self.run_browser('page.html', '', '/report_result?1') + def test_sdl_audio_mix(self): + shutil.copyfile(path_from_root('tests', 'sounds', 'pluck.ogg'), os.path.join(self.get_dir(), 'sound.ogg')) + shutil.copyfile(path_from_root('tests', 'sounds', 'the_entertainer.ogg'), os.path.join(self.get_dir(), 'music.ogg')) + open(os.path.join(self.get_dir(), 'sdl_audio_mix.c'), 'w').write(self.with_report_result(open(path_from_root('tests', 'sdl_audio_mix.c')).read())) + + # use closure to check for a possible bug with closure minifying away newer Audio() attributes + Popen([PYTHON, EMCC, '-O2', '--minify', '0', os.path.join(self.get_dir(), 'sdl_audio_mix.c'), '--preload-file', 'sound.ogg', '--preload-file', 'music.ogg', '-o', 'page.html']).communicate() + self.run_browser('page.html', '', '/report_result?1') + def test_sdl_audio_quickload(self): open(os.path.join(self.get_dir(), 'sdl_audio_quickload.c'), 'w').write(self.with_report_result(open(path_from_root('tests', 'sdl_audio_quickload.c')).read())) |