@@ -11810,6 +11810,8 @@ def test_linking_send(self):
11810
11810
11811
11811
# This test verifies that function names embedded into the build with --js-library (JS functions exported to wasm)
11812
11812
# are minified when -O3 is used
11813
+ # Currently we rely on Closure for full minification of every appearance of JS function names.
11814
+ # TODO: Add minification also for non-Closure users and add a non-closure config to this test.
11813
11815
@is_slow_test
11814
11816
@also_with_wasm2js
11815
11817
def test_js_function_names_are_minified(self):
@@ -11822,17 +11824,11 @@ def check_size(f, expected_size):
11822
11824
self.assertLess(obtained_size, expected_size)
11823
11825
11824
11826
self.run_process([PYTHON, test_file('gen_many_js_functions.py'), 'library_long.js', 'main_long.c'])
11825
- # Currently we rely on Closure for full minification of every appearance of JS function names.
11826
- # TODO: Add minification also for non-Closure users and add [] to this list to test minification without Closure.
11827
- for closure in [['--closure=1', '-Wno-closure']]:
11828
- args = [EMCC, '-O3', '--js-library', 'library_long.js', 'main_long.c'] + self.get_cflags() + closure
11829
- self.run_process(args)
11830
-
11831
- ret = self.run_js('a.out.js')
11832
- self.assertTextDataIdentical('Sum of numbers from 1 to 1000: 500500 (expected 500500)', ret.strip())
11827
+ ret = self.do_runf('main_long.c', cflags=['-O3', '--js-library', 'library_long.js', '--closure=1'])
11828
+ self.assertTextDataIdentical('Sum of numbers from 1 to 1000: 500500 (expected 500500)', ret.strip())
11833
11829
11834
- check_size('a.out.js', 150000)
11835
- check_size('a.out.wasm', 80000)
11830
+ check_size('a.out.js', 150000)
11831
+ check_size('a.out.wasm', 80000)
11836
11832
11837
11833
# Checks that C++ exceptions managing invoke_*() wrappers will not be generated if exceptions are disabled
11838
11834
def test_no_invoke_functions_are_generated_if_exception_catching_is_disabled(self):
0 commit comments