diff options
Diffstat (limited to 'test/unit/test_bysyncify.py')
-rw-r--r-- | test/unit/test_bysyncify.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/test/unit/test_bysyncify.py b/test/unit/test_bysyncify.py index 29a8ae7cb..8d5a780e8 100644 --- a/test/unit/test_bysyncify.py +++ b/test/unit/test_bysyncify.py @@ -1,11 +1,11 @@ import os -from scripts.test.shared import WASM_OPT, NODEJS, run_process +from scripts.test.shared import WASM_OPT, WASM_DIS, WASM_SHELL, NODEJS, run_process from utils import BinaryenTestCase class BysyncifyTest(BinaryenTestCase): - def test_bysyncify(self): + def test_bysyncify_js(self): def test(args): print(args) run_process(WASM_OPT + args + [self.input_path('bysyncify-sleep.wast'), '--bysyncify', '-o', 'a.wasm']) @@ -19,3 +19,10 @@ class BysyncifyTest(BinaryenTestCase): test(['--optimize-level=1']) test(['-O3']) test(['-Os', '-g']) + + def test_bysyncify_pure_wasm(self): + run_process(WASM_OPT + [self.input_path('bysyncify-pure.wast'), '--bysyncify', '-o', 'a.wasm']) + run_process(WASM_DIS + ['a.wasm', '-o', 'a.wast']) + output = run_process(WASM_SHELL + ['a.wast'], capture_output=True).stdout + with open(self.input_path('bysyncify-pure.txt')) as f: + self.assertEqual(f.read(), output) |