summaryrefslogtreecommitdiff
path: root/test/unit/test_features.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit/test_features.py')
-rw-r--r--test/unit/test_features.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/unit/test_features.py b/test/unit/test_features.py
index 7eb814e39..9c3b20ed7 100644
--- a/test/unit/test_features.py
+++ b/test/unit/test_features.py
@@ -349,6 +349,13 @@ class TargetFeaturesSectionTest(utils.BinaryenTestCase):
self.assertIn('anyref', disassembly)
self.assertIn('eqref', disassembly)
+ def test_superset(self):
+ # It is ok to enable additional features past what is in the section.
+ shared.run_process(
+ shared.WASM_OPT + ['--print', '--detect-features', '-mvp',
+ '--enable-simd', '--enable-sign-ext',
+ self.input_path('signext_target_feature.wasm')])
+
def test_incompatible_features(self):
path = self.input_path('signext_target_feature.wasm')
p = shared.run_process(
@@ -357,7 +364,7 @@ class TargetFeaturesSectionTest(utils.BinaryenTestCase):
check=False, capture_output=True
)
self.assertNotEqual(p.returncode, 0)
- self.assertIn('Fatal: module features do not match specified features. ' +
+ self.assertIn('Fatal: features section is not a subset of specified features. ' +
'Use --detect-features to resolve.',
p.stderr)