Skip to content

Commit 0b24ac6

Browse files
sbc100arbiny
authored andcommitted
Move glfw tests into browser/interactive sub-directories. NFC (emscripten-core#17435)
Also, name them consistently with the `test_` prefix.
1 parent 2830b55 commit 0b24ac6

14 files changed

+15
-15
lines changed
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

tests/test_browser.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1241,7 +1241,7 @@ def test_glfw_joystick(self):
12411241
};
12421242
''')
12431243

1244-
self.btest_exit(test_file('test_glfw_joystick.c'), args=['-O2', '--minify=0', '-o', 'page.html', '--pre-js', 'pre.js', '-lGL', '-lglfw3', '-sUSE_GLFW=3'])
1244+
self.btest_exit(test_file('browser/test_glfw_joystick.c'), args=['-O2', '--minify=0', '-o', 'page.html', '--pre-js', 'pre.js', '-lGL', '-lglfw3', '-sUSE_GLFW=3'])
12451245

12461246
@requires_graphics_hardware
12471247
def test_webgl_context_attributes(self):
@@ -1580,15 +1580,15 @@ def test_sdl_fog_linear(self):
15801580

15811581
@requires_graphics_hardware
15821582
def test_glfw(self):
1583-
self.btest_exit('glfw.c', args=['-sLEGACY_GL_EMULATION', '-lglfw', '-lGL'])
1584-
self.btest_exit('glfw.c', args=['-sLEGACY_GL_EMULATION', '-sUSE_GLFW=2', '-lglfw', '-lGL'])
1583+
self.btest_exit('browser/test_glfw.c', args=['-sLEGACY_GL_EMULATION', '-lglfw', '-lGL'])
1584+
self.btest_exit('browser/test_glfw.c', args=['-sLEGACY_GL_EMULATION', '-sUSE_GLFW=2', '-lglfw', '-lGL'])
15851585

15861586
def test_glfw_minimal(self):
1587-
self.btest_exit('glfw_minimal.c', args=['-lglfw', '-lGL'])
1588-
self.btest_exit('glfw_minimal.c', args=['-sUSE_GLFW=2', '-lglfw', '-lGL'])
1587+
self.btest_exit('browser/test_glfw_minimal.c', args=['-lglfw', '-lGL'])
1588+
self.btest_exit('browser/test_glfw_minimal.c', args=['-sUSE_GLFW=2', '-lglfw', '-lGL'])
15891589

15901590
def test_glfw_time(self):
1591-
self.btest_exit('test_glfw_time.c', args=['-sUSE_GLFW=3', '-lglfw', '-lGL'])
1591+
self.btest_exit('browser/test_glfw_time.c', args=['-sUSE_GLFW=3', '-lglfw', '-lGL'])
15921592

15931593
def _test_egl_base(self, *args):
15941594
self.btest_exit(test_file('test_egl.c'), args=['-O2', '-lEGL', '-lGL'] + list(args))
@@ -2881,12 +2881,12 @@ def in_html(expected):
28812881
def test_glfw3(self, args):
28822882
for opts in [[], ['-sLEGACY_GL_EMULATION'], ['-Os', '--closure=1']]:
28832883
print(opts)
2884-
self.btest(test_file('glfw3.c'), args=['-sUSE_GLFW=3', '-lglfw', '-lGL'] + args + opts, expected='1')
2884+
self.btest(test_file('browser/test_glfw3.c'), args=['-sUSE_GLFW=3', '-lglfw', '-lGL'] + args + opts, expected='1')
28852885

28862886
@requires_graphics_hardware
28872887
def test_glfw_events(self):
2888-
self.btest(test_file('glfw_events.c'), args=['-sUSE_GLFW=2', "-DUSE_GLFW=2", '-lglfw', '-lGL'], expected='1')
2889-
self.btest(test_file('glfw_events.c'), args=['-sUSE_GLFW=3', "-DUSE_GLFW=3", '-lglfw', '-lGL'], expected='1')
2888+
self.btest(test_file('browser/test_glfw_events.c'), args=['-sUSE_GLFW=2', "-DUSE_GLFW=2", '-lglfw', '-lGL'], expected='1')
2889+
self.btest(test_file('browser/test_glfw_events.c'), args=['-sUSE_GLFW=3', "-DUSE_GLFW=3", '-lglfw', '-lGL'], expected='1')
28902890

28912891
@requires_graphics_hardware
28922892
def test_sdl2_image(self):

tests/test_interactive.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -203,22 +203,22 @@ def test_freealut(self):
203203
self.run_browser('page.html', 'You should hear "Hello World!"')
204204

205205
def test_glfw_cursor_disabled(self):
206-
self.btest_exit('test_glfw_cursor_disabled.c', args=['-sUSE_GLFW=3', '-lglfw', '-lGL'])
206+
self.btest_exit('interactive/test_glfw_cursor_disabled.c', args=['-sUSE_GLFW=3', '-lglfw', '-lGL'])
207207

208208
def test_glfw_dropfile(self):
209-
self.btest_exit('test_glfw_dropfile.c', args=['-sUSE_GLFW=3', '-lglfw', '-lGL'])
209+
self.btest_exit('interactive/test_glfw_dropfile.c', args=['-sUSE_GLFW=3', '-lglfw', '-lGL'])
210210

211211
def test_glfw_fullscreen(self):
212-
self.btest_exit('test_glfw_fullscreen.c', args=['-sUSE_GLFW=3'])
212+
self.btest_exit('interactive/test_glfw_fullscreen.c', args=['-sUSE_GLFW=3'])
213213

214214
def test_glfw_get_key_stuck(self):
215-
self.btest_exit('test_glfw_get_key_stuck.c', args=['-sUSE_GLFW=3'])
215+
self.btest_exit('interactive/test_glfw_get_key_stuck.c', args=['-sUSE_GLFW=3'])
216216

217217
def test_glfw_joystick(self):
218-
self.btest_exit('glfw_joystick.c', args=['-sUSE_GLFW=3'])
218+
self.btest_exit('interactive/test_glfw_joystick.c', args=['-sUSE_GLFW=3'])
219219

220220
def test_glfw_pointerlock(self):
221-
self.btest_exit('test_glfw_pointerlock.c', args=['-sUSE_GLFW=3'])
221+
self.btest_exit('interactive/test_glfw_pointerlock.c', args=['-sUSE_GLFW=3'])
222222

223223
def test_glut_fullscreen(self):
224224
self.skipTest('looks broken')

0 commit comments

Comments
 (0)