diff options
author | Alon Zakai <azakai@google.com> | 2019-03-20 15:52:19 -0700 |
---|---|---|
committer | Alon Zakai <azakai@google.com> | 2019-03-20 15:52:19 -0700 |
commit | 1690311955c5add86d634ecc47e937315b3b6c41 (patch) | |
tree | 429a0df2e87d41f46ed2408c90657b221294e22f /test/crash/test_features.py | |
parent | fec88b85e44b49ac3273b0b7d4e06fba060df36f (diff) | |
parent | fe0b16aa222318588f3bfd84e549b4a1528be296 (diff) | |
download | binaryen-1690311955c5add86d634ecc47e937315b3b6c41.tar.gz binaryen-1690311955c5add86d634ecc47e937315b3b6c41.tar.bz2 binaryen-1690311955c5add86d634ecc47e937315b3b6c41.zip |
Merge remote-tracking branch 'origin/master' into nans
Diffstat (limited to 'test/crash/test_features.py')
-rw-r--r-- | test/crash/test_features.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/crash/test_features.py b/test/crash/test_features.py new file mode 100644 index 000000000..87521d4c0 --- /dev/null +++ b/test/crash/test_features.py @@ -0,0 +1,18 @@ +import unittest +from scripts.test.shared import WASM_OPT, run_process + + +class FeatureValidationTest(unittest.TestCase): + def test_simd_type(self): + module = """ + (module + (func $foo (param $0 v128) (result v128) + (local.get $0) + ) + ) + """ + p = run_process(WASM_OPT + ['--mvp-features', '--print'], + input=module, check=False, capture_output=True) + self.assertIn("all used types should be allowed", p.stderr) + self.assertIn("Fatal: error in validating input", p.stderr) + self.assertNotEqual(p.returncode, 0) |