summaryrefslogtreecommitdiff
path: root/test/unit/test_bysyncify.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit/test_bysyncify.py')
-rw-r--r--test/unit/test_bysyncify.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/unit/test_bysyncify.py b/test/unit/test_bysyncify.py
new file mode 100644
index 000000000..5373a4def
--- /dev/null
+++ b/test/unit/test_bysyncify.py
@@ -0,0 +1,20 @@
+import os
+
+from scripts.test.shared import WASM_OPT, NODEJS, run_process
+from utils import BinaryenTestCase
+
+
+class BysyncifyTest(BinaryenTestCase):
+ def test_bysyncify(self):
+ def test(args):
+ print(args)
+ run_process(WASM_OPT + args + [self.input_path('bysyncify.wast'), '--bysyncify', '-o', 'a.wasm'])
+ print(' file size: %d' % os.path.getsize('a.wasm'))
+ run_process([NODEJS, self.input_path('bysyncify.js')])
+
+ test(['-g'])
+ test([])
+ test(['-O1'])
+ test(['--optimize-level=1'])
+ test(['-O3'])
+ test(['-Os', '-g'])