summaryrefslogtreecommitdiff
path: root/test/crash/test_features.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/crash/test_features.py')
-rw-r--r--test/crash/test_features.py18
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)