@@ -11810,6 +11810,8 @@ def test_linking_send(self):
1181011810
1181111811 # This test verifies that function names embedded into the build with --js-library (JS functions exported to wasm)
1181211812 # 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.
1181311815 @is_slow_test
1181411816 @also_with_wasm2js
1181511817 def test_js_function_names_are_minified(self):
@@ -11822,17 +11824,11 @@ def check_size(f, expected_size):
1182211824 self.assertLess(obtained_size, expected_size)
1182311825
1182411826 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())
1183311829
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)
1183611832
1183711833 # Checks that C++ exceptions managing invoke_*() wrappers will not be generated if exceptions are disabled
1183811834 def test_no_invoke_functions_are_generated_if_exception_catching_is_disabled(self):
0 commit comments