Skip to content

Commit 6ed1380

Browse files
committed
more tests
1 parent 5b956b4 commit 6ed1380

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

test/test_other.py

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10278,20 +10278,30 @@ def verify_features_sec(feature, expect_in):
1027810278
else:
1027910279
self.assertFalse(feature in features)
1028010280

10281-
def compile(flag):
10282-
self.run_process([EMCC, test_file('hello_world.c'), '-c', flag])
10281+
def compile(flags):
10282+
self.run_process([EMCC, test_file('hello_world.c'), '-c'] + flags)
1028310283

10284-
compile('')
10284+
compile([])
1028510285
verify_features_sec('bulk-memory', False)
1028610286
verify_features_sec('nontrapping-fptoint', False)
1028710287
verify_features_sec('sign-ext', True)
1028810288
verify_features_sec('mutable-globals', True)
1028910289
verify_features_sec('multivalue', True)
10290+
verify_features_sec('reference-types', True)
1029010291

10291-
compile('-sMIN_SAFARI_VERSION=150000')
10292+
compile(['-mnontrapping-fptoint'])
10293+
verify_features_sec('nontrapping-fptoint', True)
10294+
10295+
compile(['-sMIN_SAFARI_VERSION=150000'])
10296+
verify_features_sec('sign-ext', True)
10297+
verify_features_sec('mutable-globals', True)
10298+
verify_features_sec('multivalue', True)
1029210299
verify_features_sec('bulk-memory', True)
1029310300
verify_features_sec('nontrapping-fptoint', True)
1029410301

10302+
compile(['-sMIN_SAFARI_VERSION=150000', '-mno-bulk-memory'])
10303+
verify_features_sec('bulk-memory', False)
10304+
1029510305
def test_js_preprocess(self):
1029610306
# Use stderr rather than stdout here because stdout is redirected to the output JS file itself.
1029710307
create_file('lib.js', '''

0 commit comments

Comments
 (0)