Skip to content

Commit

Permalink
Add test for BINARYEN_METHOD validation.
Browse files Browse the repository at this point in the history
  • Loading branch information
juj committed Dec 16, 2016
1 parent a836038 commit 79fd452
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/test_other.py
Original file line number Diff line number Diff line change
Expand Up @@ -7012,6 +7012,11 @@ def test_binaryen_warn_mem(self):
subprocess.check_call([PYTHON, EMCC, path_from_root('tests', 'hello_world.cpp'), '-s', 'WASM=1', '-s', 'BINARYEN_METHOD="native-wasm"', '-s', 'TOTAL_MEMORY=' + str(16*1024*1024), '--pre-js', 'pre.js', '-s', 'ALLOW_MEMORY_GROWTH=1'])
self.assertContained('hello, world!', run_js('a.out.js', engine=SPIDERMONKEY_ENGINE))

def test_binaryen_invalid_method(self):
proc = Popen([PYTHON, EMCC, path_from_root('tests', 'hello_world.cpp'), '-o', 'test.js', '-s', "BINARYEN_METHOD='invalid'"])
proc.communicate()
assert proc.returncode != 0

def test_binaryen_default_method(self):
if SPIDERMONKEY_ENGINE not in JS_ENGINES: return self.skip('cannot run without spidermonkey')
subprocess.check_call([PYTHON, EMCC, path_from_root('tests', 'hello_world.cpp'), '-s', 'WASM=1'])
Expand Down

0 comments on commit 79fd452

Please sign in to comment.