@@ -7815,10 +7815,6 @@ def test_dash_s_bad_json_types(self):
7815
7815
err = self.expect_fail([EMCC, test_file('hello_world.c'), '-sEXPORTED_FUNCTIONS=[{"a":1}]'])
7816
7816
self.assertContained("list members in settings must be strings (not $<class 'dict'>)", err)
7817
7817
7818
- def test_dash_s_repeated(self):
7819
- err = self.expect_fail([EMCC, '-Werror', test_file('hello_world.c'), '-sEXPORTED_FUNCTIONS=foo', '-sEXPORTED_FUNCTIONS=bar'])
7820
- self.assertContained('emcc: error: -sEXPORTED_FUNCTIONS specified multiple times. Ignoring previous value (`foo`) [-Wunused-command-line-argument]', err)
7821
-
7822
7818
def test_zeroinit(self):
7823
7819
create_file('src.c', r'''
7824
7820
#include <stdio.h>
@@ -12023,23 +12019,21 @@ def test_default_to_cxx(self):
12023
12019
12024
12020
@parameterized({
12025
12021
'': ([],),
12026
- 'minimal': (['-sMINIMAL_RUNTIME'],),
12022
+ 'minimal': (['-sMINIMAL_RUNTIME', '-sSUPPORT_ERRNO' ],),
12027
12023
})
12028
12024
def test_support_errno(self, args):
12029
12025
self.emcc_args += args + ['-sEXPORTED_FUNCTIONS=_main,___errno_location', '-Wno-deprecated']
12030
12026
12031
- self.do_other_test('test_support_errno.c', emcc_args=['-sSUPPORT_ERRNO'] )
12032
- size_enabled = os.path.getsize('test_support_errno.js')
12027
+ self.do_other_test('test_support_errno.c')
12028
+ size_default = os.path.getsize('test_support_errno.js')
12033
12029
12034
12030
# Run the same test again but with SUPPORT_ERRNO disabled. This time we don't expect errno
12035
12031
# to be set after the failing syscall.
12036
- self.do_other_test('test_support_errno.c', emcc_args=['-sSUPPORT_ERRNO=0'], out_suffix='_disabled')
12032
+ self.emcc_args += ['-sSUPPORT_ERRNO=0']
12033
+ self.do_other_test('test_support_errno.c', out_suffix='_disabled')
12037
12034
12038
12035
# Verify the JS output was smaller
12039
- size_disabled = os.path.getsize('test_support_errno.js')
12040
- print(size_enabled)
12041
- print(size_disabled)
12042
- self.assertLess(size_disabled, size_enabled)
12036
+ self.assertLess(os.path.getsize('test_support_errno.js'), size_default)
12043
12037
12044
12038
def test_assembly(self):
12045
12039
self.run_process([EMCC, '-c', test_file('other/test_asm.s'), '-o', 'foo.o'])
0 commit comments