@@ -490,7 +490,8 @@ def test_dumpmachine(self):
490
490
491
491
@parameterized({
492
492
'c': [EMCC, '.c'],
493
- 'cxx': [EMXX, '.cpp']})
493
+ 'cxx': [EMXX, '.cpp']
494
+ })
494
495
def test_emcc_2(self, compiler, suffix):
495
496
# emcc src.cpp -c and emcc -c src.cpp -o src.[o|foo|so] ==> should always give an object file
496
497
for args in [[], ['-o', 'src.o'], ['-o', 'src.foo'], ['-o', 'src.so']]:
@@ -513,7 +514,8 @@ def test_bc_output_warning(self):
513
514
514
515
@parameterized({
515
516
'c': [EMCC, '.c'],
516
- 'cxx': [EMXX, '.cpp']})
517
+ 'cxx': [EMXX, '.cpp']
518
+ })
517
519
def test_emcc_3(self, compiler, suffix):
518
520
# handle singleton archives
519
521
self.run_process([compiler, '-c', test_file('hello_world' + suffix), '-o', 'a.o'])
@@ -538,9 +540,7 @@ def test_emcc_3(self, compiler, suffix):
538
540
delete_file(path)
539
541
540
542
@is_slow_test
541
- @parameterized({
542
- 'c': [EMCC],
543
- 'cxx': [EMXX]})
543
+ @with_both_compilers
544
544
def test_emcc_4(self, compiler):
545
545
# Optimization: emcc src.cpp -o something.js [-Ox]. -O0 is the same as not specifying any optimization setting
546
546
# link_param are used after compiling first
@@ -4687,9 +4687,8 @@ def test_fs_after_main(self):
4687
4687
self.run_process([EMXX, test_file('fs_after_main.cpp')])
4688
4688
self.assertContained('Test passed.', self.run_js('a.out.js'))
4689
4689
4690
- def test_os_oz(self):
4691
- for opt in ['-O1', '-O2', '-Os', '-Oz', '-O3', '-Og']:
4692
- print(opt)
4690
+ def test_opt_levels(self):
4691
+ for opt in ['-O1', '-O2', '-Os', '-Oz', '-O3', '-Og', '-Ofast']:
4693
4692
proc = self.run_process([EMCC, '-v', test_file('hello_world.c'), opt], stderr=PIPE)
4694
4693
self.assertContained(opt, proc.stderr)
4695
4694
self.assertContained('hello, world!', self.run_js('a.out.js'))
0 commit comments