Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix interactive SDL1 tests #21420

Merged
merged 1 commit into from
Feb 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading