@@ -55,10 +55,10 @@ def test_sdl2_togglefullscreen(self):
55
55
self .btest_exit ('browser/test_sdl_togglefullscreen.c' , args = ['-sUSE_SDL=2' ])
56
56
57
57
def test_sdl_audio (self ):
58
- shutil .copyfile (test_file ('sounds' , ' alarmvictory_1.ogg' ), self .in_dir ('sound.ogg' ))
59
- shutil .copyfile (test_file ('sounds' , ' alarmcreatemiltaryfoot_1.wav' ), self .in_dir ('sound2.wav' ))
60
- shutil .copyfile (test_file ('sounds' , ' noise.ogg' ), self .in_dir ('noise.ogg' ))
61
- shutil .copyfile (test_file ('sounds' , ' the_entertainer.ogg' ), self .in_dir ('the_entertainer.ogg' ))
58
+ shutil .copyfile (test_file ('sounds/ alarmvictory_1.ogg' ), self .in_dir ('sound.ogg' ))
59
+ shutil .copyfile (test_file ('sounds/ alarmcreatemiltaryfoot_1.wav' ), self .in_dir ('sound2.wav' ))
60
+ shutil .copyfile (test_file ('sounds/ noise.ogg' ), self .in_dir ('noise.ogg' ))
61
+ shutil .copyfile (test_file ('sounds/ the_entertainer.ogg' ), self .in_dir ('the_entertainer.ogg' ))
62
62
create_file ('bad.ogg' , 'I claim to be audio, but am lying' )
63
63
64
64
# use closure to check for a possible bug with closure minifying away newer Audio() attributes
@@ -78,7 +78,7 @@ def test_sdl_audio(self):
78
78
'wasmfs' : (['-sWASMFS' ],),
79
79
})
80
80
def test_sdl_audio_mix_channels (self , args ):
81
- shutil .copyfile (test_file ('sounds' , ' noise.ogg' ), self .in_dir ('sound.ogg' ))
81
+ shutil .copyfile (test_file ('sounds/ noise.ogg' ), self .in_dir ('sound.ogg' ))
82
82
83
83
self .btest_exit ('sdl_audio_mix_channels.c' , args = ['-O2' , '--minify=0' , '--preload-file' , 'sound.ogg' ] + args )
84
84
@@ -87,14 +87,14 @@ def test_sdl_audio_mix_channels(self, args):
87
87
'wasmfs' : (['-sWASMFS' ],),
88
88
})
89
89
def test_sdl_audio_mix (self , args ):
90
- shutil .copyfile (test_file ('sounds' , ' pluck.ogg' ), self .in_dir ('sound.ogg' ))
91
- shutil .copyfile (test_file ('sounds' , ' the_entertainer.ogg' ), self .in_dir ('music.ogg' ))
92
- shutil .copyfile (test_file ('sounds' , ' noise.ogg' ), self .in_dir ('noise.ogg' ))
90
+ shutil .copyfile (test_file ('sounds/ pluck.ogg' ), self .in_dir ('sound.ogg' ))
91
+ shutil .copyfile (test_file ('sounds/ the_entertainer.ogg' ), self .in_dir ('music.ogg' ))
92
+ shutil .copyfile (test_file ('sounds/ noise.ogg' ), self .in_dir ('noise.ogg' ))
93
93
94
94
self .btest_exit ('sdl_audio_mix.c' , args = ['-O2' , '--minify=0' , '--preload-file' , 'sound.ogg' , '--preload-file' , 'music.ogg' , '--preload-file' , 'noise.ogg' ] + args )
95
95
96
96
def test_sdl_audio_panning (self ):
97
- shutil .copyfile (test_file ('sounds' , ' the_entertainer.wav' ), self .in_dir ('the_entertainer.wav' ))
97
+ shutil .copyfile (test_file ('sounds/ the_entertainer.wav' ), self .in_dir ('the_entertainer.wav' ))
98
98
99
99
# use closure to check for a possible bug with closure minifying away newer Audio() attributes
100
100
self .btest_exit ('sdl_audio_panning.c' , args = ['-O2' , '--closure=1' , '--minify=0' , '--preload-file' , 'the_entertainer.wav' , '-sEXPORTED_FUNCTIONS=_main,_play' ])
@@ -104,7 +104,7 @@ def test_sdl_audio_beeps(self):
104
104
self .btest_exit ('sdl_audio_beep.cpp' , args = ['-O2' , '--closure=1' , '--minify=0' , '-sDISABLE_EXCEPTION_CATCHING=0' , '-o' , 'page.html' ])
105
105
106
106
def test_sdl2_mixer_wav (self ):
107
- shutil .copyfile (test_file ('sounds' , ' the_entertainer.wav' ), 'sound.wav' )
107
+ shutil .copyfile (test_file ('sounds/ the_entertainer.wav' ), 'sound.wav' )
108
108
self .btest_exit ('browser/test_sdl2_mixer_wav.c' , args = [
109
109
'-O2' ,
110
110
'-sUSE_SDL=2' ,
@@ -138,47 +138,47 @@ def test_sdl2_audio_beeps(self):
138
138
self .btest_exit ('browser/test_sdl2_audio_beep.cpp' , args = ['-O2' , '--closure=1' , '--minify=0' , '-sDISABLE_EXCEPTION_CATCHING=0' , '-sUSE_SDL=2' ])
139
139
140
140
def test_openal_playback (self ):
141
- shutil .copyfile (test_file ('sounds' , ' audio.wav' ), self .in_dir ('audio.wav' ))
141
+ shutil .copyfile (test_file ('sounds/ audio.wav' ), self .in_dir ('audio.wav' ))
142
142
143
143
for args in [[], ['-pthread' , '-sPROXY_TO_PTHREAD' ]]:
144
144
self .compile_btest (['-O2' , test_file ('openal_playback.cpp' ), '--preload-file' , 'audio.wav' , '-o' , 'page.html' ] + args )
145
145
self .run_browser ('page.html' , '/report_result?1' )
146
146
147
147
def test_openal_buffers (self ):
148
- self .btest ('openal_buffers.c' , '0' , args = ['--preload-file' , test_file ('sounds' , ' the_entertainer.wav' ) + '@/' ],)
148
+ self .btest ('openal_buffers.c' , '0' , args = ['--preload-file' , test_file ('sounds/ the_entertainer.wav' ) + '@/' ],)
149
149
150
150
def test_openal_buffers_animated_pitch (self ):
151
- self .btest ('openal_buffers.c' , '0' , args = ['-DTEST_ANIMATED_PITCH=1' , '--preload-file' , test_file ('sounds' , ' the_entertainer.wav' ) + '@/' ],)
151
+ self .btest ('openal_buffers.c' , '0' , args = ['-DTEST_ANIMATED_PITCH=1' , '--preload-file' , test_file ('sounds/ the_entertainer.wav' ) + '@/' ],)
152
152
153
153
def test_openal_looped_pitched_playback (self ):
154
- self .btest ('openal_playback.cpp' , '1' , args = ['-DTEST_LOOPED_PLAYBACK=1' , '--preload-file' , test_file ('sounds' , ' the_entertainer.wav' ) + '@/audio.wav' ],)
154
+ self .btest ('openal_playback.cpp' , '1' , args = ['-DTEST_LOOPED_PLAYBACK=1' , '--preload-file' , test_file ('sounds/ the_entertainer.wav' ) + '@/audio.wav' ],)
155
155
156
156
def test_openal_looped_seek_playback (self ):
157
- self .btest ('openal_playback.cpp' , '1' , args = ['-DTEST_LOOPED_SEEK_PLAYBACK=1' , '-DTEST_LOOPED_PLAYBACK=1' , '--preload-file' , test_file ('sounds' , ' the_entertainer.wav' ) + '@/audio.wav' ],)
157
+ self .btest ('openal_playback.cpp' , '1' , args = ['-DTEST_LOOPED_SEEK_PLAYBACK=1' , '-DTEST_LOOPED_PLAYBACK=1' , '--preload-file' , test_file ('sounds/ the_entertainer.wav' ) + '@/audio.wav' ],)
158
158
159
159
def test_openal_animated_looped_pitched_playback (self ):
160
- self .btest ('openal_playback.cpp' , '1' , args = ['-DTEST_ANIMATED_LOOPED_PITCHED_PLAYBACK=1' , '-DTEST_LOOPED_PLAYBACK=1' , '--preload-file' , test_file ('sounds' , ' the_entertainer.wav' ) + '@/audio.wav' ],)
160
+ self .btest ('openal_playback.cpp' , '1' , args = ['-DTEST_ANIMATED_LOOPED_PITCHED_PLAYBACK=1' , '-DTEST_LOOPED_PLAYBACK=1' , '--preload-file' , test_file ('sounds/ the_entertainer.wav' ) + '@/audio.wav' ],)
161
161
162
162
def test_openal_animated_looped_distance_playback (self ):
163
- self .btest ('openal_playback.cpp' , '1' , args = ['-DTEST_ANIMATED_LOOPED_DISTANCE_PLAYBACK=1' , '-DTEST_LOOPED_PLAYBACK=1' , '--preload-file' , test_file ('sounds' , ' the_entertainer.wav' ) + '@/audio.wav' ],)
163
+ self .btest ('openal_playback.cpp' , '1' , args = ['-DTEST_ANIMATED_LOOPED_DISTANCE_PLAYBACK=1' , '-DTEST_LOOPED_PLAYBACK=1' , '--preload-file' , test_file ('sounds/ the_entertainer.wav' ) + '@/audio.wav' ],)
164
164
165
165
def test_openal_animated_looped_doppler_playback (self ):
166
- self .btest ('openal_playback.cpp' , '1' , args = ['-DTEST_ANIMATED_LOOPED_DOPPLER_PLAYBACK=1' , '-DTEST_LOOPED_PLAYBACK=1' , '--preload-file' , test_file ('sounds' , ' the_entertainer.wav' ) + '@/audio.wav' ],)
166
+ self .btest ('openal_playback.cpp' , '1' , args = ['-DTEST_ANIMATED_LOOPED_DOPPLER_PLAYBACK=1' , '-DTEST_LOOPED_PLAYBACK=1' , '--preload-file' , test_file ('sounds/ the_entertainer.wav' ) + '@/audio.wav' ],)
167
167
168
168
def test_openal_animated_looped_panned_playback (self ):
169
- self .btest ('openal_playback.cpp' , '1' , args = ['-DTEST_ANIMATED_LOOPED_PANNED_PLAYBACK=1' , '-DTEST_LOOPED_PLAYBACK=1' , '--preload-file' , test_file ('sounds' , ' the_entertainer.wav' ) + '@/audio.wav' ],)
169
+ self .btest ('openal_playback.cpp' , '1' , args = ['-DTEST_ANIMATED_LOOPED_PANNED_PLAYBACK=1' , '-DTEST_LOOPED_PLAYBACK=1' , '--preload-file' , test_file ('sounds/ the_entertainer.wav' ) + '@/audio.wav' ],)
170
170
171
171
def test_openal_animated_looped_relative_playback (self ):
172
- self .btest ('openal_playback.cpp' , '1' , args = ['-DTEST_ANIMATED_LOOPED_RELATIVE_PLAYBACK=1' , '-DTEST_LOOPED_PLAYBACK=1' , '--preload-file' , test_file ('sounds' , ' the_entertainer.wav' ) + '@/audio.wav' ],)
172
+ self .btest ('openal_playback.cpp' , '1' , args = ['-DTEST_ANIMATED_LOOPED_RELATIVE_PLAYBACK=1' , '-DTEST_LOOPED_PLAYBACK=1' , '--preload-file' , test_file ('sounds/ the_entertainer.wav' ) + '@/audio.wav' ],)
173
173
174
174
def test_openal_al_soft_loop_points (self ):
175
- self .btest ('openal_playback.cpp' , '1' , args = ['-DTEST_AL_SOFT_LOOP_POINTS=1' , '-DTEST_LOOPED_PLAYBACK=1' , '--preload-file' , test_file ('sounds' , ' the_entertainer.wav' ) + '@/audio.wav' ],)
175
+ self .btest ('openal_playback.cpp' , '1' , args = ['-DTEST_AL_SOFT_LOOP_POINTS=1' , '-DTEST_LOOPED_PLAYBACK=1' , '--preload-file' , test_file ('sounds/ the_entertainer.wav' ) + '@/audio.wav' ],)
176
176
177
177
def test_openal_alc_soft_pause_device (self ):
178
- self .btest ('openal_playback.cpp' , '1' , args = ['-DTEST_ALC_SOFT_PAUSE_DEVICE=1' , '-DTEST_LOOPED_PLAYBACK=1' , '--preload-file' , test_file ('sounds' , ' the_entertainer.wav' ) + '@/audio.wav' ],)
178
+ self .btest ('openal_playback.cpp' , '1' , args = ['-DTEST_ALC_SOFT_PAUSE_DEVICE=1' , '-DTEST_LOOPED_PLAYBACK=1' , '--preload-file' , test_file ('sounds/ the_entertainer.wav' ) + '@/audio.wav' ],)
179
179
180
180
def test_openal_al_soft_source_spatialize (self ):
181
- self .btest ('openal_playback.cpp' , '1' , args = ['-DTEST_AL_SOFT_SOURCE_SPATIALIZE=1' , '-DTEST_LOOPED_PLAYBACK=1' , '--preload-file' , test_file ('sounds' , ' the_entertainer.wav' ) + '@/audio.wav' ],)
181
+ self .btest ('openal_playback.cpp' , '1' , args = ['-DTEST_AL_SOFT_SOURCE_SPATIALIZE=1' , '-DTEST_LOOPED_PLAYBACK=1' , '--preload-file' , test_file ('sounds/ the_entertainer.wav' ) + '@/audio.wav' ],)
182
182
183
183
def test_openal_capture (self ):
184
184
self .btest ('openal_capture.c' , expected = '0' )
@@ -191,8 +191,8 @@ def get_freealut_library(self):
191
191
return self .get_library (os .path .join ('third_party' , 'freealut' ), os .path .join ('src' , '.libs' , 'libalut.a' ), configure_args = ['--disable-shared' ])
192
192
193
193
def test_freealut (self ):
194
- src = test_file ('third_party' , ' freealut' , 'examples' , 'hello_world.c' )
195
- inc = test_file ('third_party' , ' freealut' , 'include' )
194
+ src = test_file ('third_party/ freealut' , 'examples' , 'hello_world.c' )
195
+ inc = test_file ('third_party/ freealut' , 'include' )
196
196
self .compile_btest ([src , '-O2' , '-o' , 'page.html' , '-I' + inc ] + self .get_freealut_library ())
197
197
self .run_browser ('page.html' , message = 'You should hear "Hello World!"' )
198
198
@@ -228,7 +228,7 @@ def test_threadprofiler(self):
228
228
'-DTEST_THREAD_PROFILING=1' ,
229
229
'-sPTHREAD_POOL_SIZE=16' ,
230
230
'-sINITIAL_MEMORY=64mb' ,
231
- '--shell-file' , test_file ('pthread' , ' test_pthread_mandelbrot_shell.html' )]
231
+ '--shell-file' , test_file ('pthread/ test_pthread_mandelbrot_shell.html' )]
232
232
self .btest_exit ('pthread/test_pthread_mandelbrot.cpp' , args = args )
233
233
234
234
# Test that event backproxying works.
0 commit comments