Skip to content

Commit

Permalink
Fix interactive SDL1 tests (#21420)
Browse files Browse the repository at this point in the history
  • Loading branch information
Daft-Freak committed Feb 24, 2024
1 parent 96124ff commit e6be4f5
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions test/test_interactive.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ def test_sdl_mousewheel(self):
self.btest_exit('test_sdl_mousewheel.c')

def test_sdl_touch(self):
self.btest('sdl_touch.c', args=['-O2', '-g1', '--closure=1'], expected='0')
self.btest('test_sdl_touch.c', args=['-O2', '-g1', '--closure=1'], expected='0')

def test_sdl_wm_togglefullscreen(self):
self.btest_exit('sdl_wm_togglefullscreen.c')
self.btest_exit('test_sdl_wm_togglefullscreen.c')

def test_sdl_fullscreen_samecanvassize(self):
self.btest_exit('sdl_fullscreen_samecanvassize.c')
self.btest_exit('test_sdl_fullscreen_samecanvassize.c')

def test_sdl2_togglefullscreen(self):
self.btest_exit('browser/test_sdl_togglefullscreen.c', args=['-sUSE_SDL=2'])
Expand All @@ -62,7 +62,7 @@ def test_sdl_audio(self):
create_file('bad.ogg', 'I claim to be audio, but am lying')

# use closure to check for a possible bug with closure minifying away newer Audio() attributes
self.btest_exit('sdl_audio.c', args=['--preload-file', 'sound.ogg', '--preload-file', 'sound2.wav', '--embed-file', 'the_entertainer.ogg', '--preload-file', 'noise.ogg', '--preload-file', 'bad.ogg'])
self.btest_exit('test_sdl_audio.c', args=['--preload-file', 'sound.ogg', '--preload-file', 'sound2.wav', '--embed-file', 'the_entertainer.ogg', '--preload-file', 'noise.ogg', '--preload-file', 'bad.ogg'])

# print('SDL2')
# check sdl2 as well
Expand All @@ -80,7 +80,7 @@ def test_sdl_audio(self):
def test_sdl_audio_mix_channels(self, args):
shutil.copyfile(test_file('sounds/noise.ogg'), self.in_dir('sound.ogg'))

self.btest_exit('sdl_audio_mix_channels.c', args=['-O2', '--minify=0', '--preload-file', 'sound.ogg'] + args)
self.btest_exit('test_sdl_audio_mix_channels.c', args=['-O2', '--minify=0', '--preload-file', 'sound.ogg'] + args)

@parameterized({
'': ([],),
Expand All @@ -91,17 +91,17 @@ def test_sdl_audio_mix(self, args):
shutil.copyfile(test_file('sounds/the_entertainer.ogg'), self.in_dir('music.ogg'))
shutil.copyfile(test_file('sounds/noise.ogg'), self.in_dir('noise.ogg'))

self.btest_exit('sdl_audio_mix.c', args=['-O2', '--minify=0', '--preload-file', 'sound.ogg', '--preload-file', 'music.ogg', '--preload-file', 'noise.ogg'] + args)
self.btest_exit('test_sdl_audio_mix.c', args=['-O2', '--minify=0', '--preload-file', 'sound.ogg', '--preload-file', 'music.ogg', '--preload-file', 'noise.ogg'] + args)

def test_sdl_audio_panning(self):
shutil.copyfile(test_file('sounds/the_entertainer.wav'), self.in_dir('the_entertainer.wav'))

# use closure to check for a possible bug with closure minifying away newer Audio() attributes
self.btest_exit('sdl_audio_panning.c', args=['-O2', '--closure=1', '--minify=0', '--preload-file', 'the_entertainer.wav', '-sEXPORTED_FUNCTIONS=_main,_play'])
self.btest_exit('test_sdl_audio_panning.c', args=['-O2', '--closure=1', '--minify=0', '--preload-file', 'the_entertainer.wav', '-sEXPORTED_FUNCTIONS=_main,_play'])

def test_sdl_audio_beeps(self):
# use closure to check for a possible bug with closure minifying away newer Audio() attributes
self.btest_exit('sdl_audio_beep.cpp', args=['-O2', '--closure=1', '--minify=0', '-sDISABLE_EXCEPTION_CATCHING=0', '-o', 'page.html'])
self.btest_exit('test_sdl_audio_beep.cpp', args=['-O2', '--closure=1', '--minify=0', '-sDISABLE_EXCEPTION_CATCHING=0', '-o', 'page.html'])

def test_sdl2_mixer_wav(self):
shutil.copyfile(test_file('sounds/the_entertainer.wav'), 'sound.wav')
Expand Down

0 comments on commit e6be4f5

Please sign in to comment.