Skip to content

Commit 7ef0c59

Browse files
authored
Remove if/loop tests, and a fastcomp test (#20897)
Removes the silliest tests we had: a single loop, a single if, and an if-else. Also remove test_multiply_defined_symbols which only made sense in fastcomp. There are no actually multiply defined symbols in that test, aside from during the link stage, so this tested that the fastcomp .a linker handled that properly. But lld does that today, and does not need testing here. Even if we did want to test it, this is a poor test as the duplicate symbols are not referred to anyhow, so they are not even collected from the respective .a files.
1 parent 7aecdda commit 7ef0c59

File tree

7 files changed

+0
-96
lines changed

7 files changed

+0
-96
lines changed

test/core/test_if.c

Lines changed: 0 additions & 15 deletions
This file was deleted.

test/core/test_if.out

Lines changed: 0 additions & 1 deletion
This file was deleted.

test/core/test_if_else.c

Lines changed: 0 additions & 17 deletions
This file was deleted.

test/core/test_if_else.out

Lines changed: 0 additions & 1 deletion
This file was deleted.

test/core/test_loop.c

Lines changed: 0 additions & 21 deletions
This file was deleted.

test/core/test_loop.out

Lines changed: 0 additions & 1 deletion
This file was deleted.

test/test_core.py

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -780,46 +780,6 @@ def test_rounding(self):
780780
self.set_setting('EXIT_RUNTIME')
781781
self.do_core_test('test_rounding.c')
782782

783-
def test_multiply_defined_symbols(self):
784-
create_file('a1.c', 'int f() { return 1; }')
785-
create_file('a2.c', 'void x() {}')
786-
create_file('b1.c', 'int f() { return 2; }')
787-
create_file('b2.c', 'void y() {}')
788-
create_file('main.c', r'''
789-
#include <stdio.h>
790-
int f();
791-
int main() {
792-
printf("result: %d\n", f());
793-
return 0;
794-
}
795-
''')
796-
797-
self.emcc('a1.c', ['-c'])
798-
self.emcc('a2.c', ['-c'])
799-
self.emcc('b1.c', ['-c'])
800-
self.emcc('b2.c', ['-c'])
801-
self.emcc('main.c', ['-c'])
802-
803-
building.emar('cr', 'liba.a', ['a1.o', 'a2.o'])
804-
building.emar('cr', 'libb.a', ['b1.o', 'b2.o'])
805-
806-
# Add -Wno-deprecated to avoid warning about bitcode linking in the LTO
807-
# version of this test.
808-
self.run_process([EMCC, '-r', '-o', 'all.o', 'main.o', 'liba.a', 'libb.a',
809-
'-Wno-deprecated'] + self.get_emcc_args())
810-
811-
self.emcc('all.o', output_filename='all.js')
812-
self.do_run('all.js', 'result: 1', no_build=True)
813-
814-
def test_if(self):
815-
self.do_core_test('test_if.c')
816-
817-
def test_if_else(self):
818-
self.do_core_test('test_if_else.c')
819-
820-
def test_loop(self):
821-
self.do_core_test('test_loop.c')
822-
823783
def test_stack(self):
824784
self.set_setting('INLINING_LIMIT')
825785
# some extra coverage in all test suites for stack checks

0 commit comments

Comments
 (0)