Skip to content

Commit 01be75a

Browse files
authored
[test] Make more use of also_with_wasm2js. NFC (#21242)
1 parent 8418fbe commit 01be75a

File tree

1 file changed

+6
-17
lines changed

1 file changed

+6
-17
lines changed

test/test_browser.py

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5092,14 +5092,9 @@ def test_single_file_html(self):
50925092
'': ([],),
50935093
'O3': (['-O3'],)
50945094
})
5095-
@parameterized({
5096-
'': ([],),
5097-
'wasm2js': (['-sWASM=0'],)
5098-
})
5099-
def test_minimal_runtime_single_file_html(self, args, opts):
5100-
if '-sWASM=0' in args:
5101-
self.require_wasm2js()
5102-
self.btest('single_file_static_initializer.cpp', '19', args=opts + args + ['-sMINIMAL_RUNTIME', '-sSINGLE_FILE'])
5095+
@also_with_wasm2js
5096+
def test_minimal_runtime_single_file_html(self, opts):
5097+
self.btest('single_file_static_initializer.cpp', '19', args=opts + ['-sMINIMAL_RUNTIME', '-sSINGLE_FILE'])
51035098
self.assertExists('test.html')
51045099
self.assertNotExists('test.js')
51055100
self.assertNotExists('test.wasm')
@@ -5113,15 +5108,9 @@ def test_single_file_in_web_environment_with_closure(self):
51135108
self.btest_exit('minimal_hello.c', args=['-sSINGLE_FILE', '-sENVIRONMENT=web', '-O2', '--closure=1'])
51145109

51155110
# Tests that SINGLE_FILE works as intended with locateFile
5116-
@parameterized({
5117-
'': ([],),
5118-
'wasm2js': (['-sWASM=0'],)
5119-
})
5120-
def test_single_file_locate_file(self, args):
5121-
if args:
5122-
self.require_wasm2js()
5123-
5124-
self.compile_btest('browser_test_hello_world.c', ['-o', 'test.js', '-sSINGLE_FILE'] + args)
5111+
@also_with_wasm2js
5112+
def test_single_file_locate_file(self):
5113+
self.compile_btest('browser_test_hello_world.c', ['-o', 'test.js', '-sSINGLE_FILE'])
51255114

51265115
create_file('test.html', '''
51275116
<script>

0 commit comments

Comments
 (0)