@@ -10703,10 +10703,19 @@ def test_emscripten_license(self, expect_license, args):
10703
10703
# unminified exported name exactly once. (need to contain the export name once for unminified
10704
10704
# access from calling code, and should not have the unminified name exist more than once, that
10705
10705
# would be wasteful for size)
10706
- def test_function_exports_are_small(self):
10706
+ @parameterized({
10707
+ '': ([],),
10708
+ 'closure': (['--closure=1'],),
10709
+ })
10710
+ @parameterized({
10711
+ 'O2': (['-O2'],),
10712
+ 'O2': (['-O2'],),
10713
+ 'Os': (['-Os'],),
10714
+ })
10715
+ def test_function_exports_are_small(self, opt, closure):
10707
10716
def test(args, closure, opt):
10717
+ print(args)
10708
10718
extra_args = args + opt + closure
10709
- print(extra_args)
10710
10719
args = [EMCC, test_file('long_function_name_in_export.c'), '-o', 'a.html', '-sENVIRONMENT=web', '-sDECLARE_ASM_MODULE_EXPORTS=0', '-Werror'] + extra_args
10711
10720
self.run_process(args)
10712
10721
@@ -10720,10 +10729,8 @@ def test(args, closure, opt):
10720
10729
num_times_export_is_referenced = output.count('thisIsAFunctionExportedFromAsmJsOrWasmWithVeryLongFunction')
10721
10730
self.assertEqual(num_times_export_is_referenced, 1)
10722
10731
10723
- for closure in [[], ['--closure=1']]:
10724
- for opt in [['-O2'], ['-O3'], ['-Os']]:
10725
- test(['-sWASM=0', '-Wno-closure'], closure, opt)
10726
- test(['-sWASM_ASYNC_COMPILATION=0'], closure, opt)
10732
+ test(['-sWASM=0', '-Wno-closure'], closure, opt)
10733
+ test(['-sWASM_ASYNC_COMPILATION=0'], closure, opt)
10727
10734
10728
10735
@parameterized({
10729
10736
'hello_world_wasm': ('hello_world', False, True),
0 commit comments