summaryrefslogtreecommitdiff
path: root/test/unit
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2022-11-01 13:07:36 -0700
committerGitHub <noreply@github.com>2022-11-01 20:07:36 +0000
commit0db7b571b23a09f96810c9d65d5f88d8eae4ba52 (patch)
treeb4bc44983623a09a0cca93b1d3b8ec9fc3d4a4ae /test/unit
parent5892f493706558a95d57b3731014b400fd832d70 (diff)
downloadbinaryen-0db7b571b23a09f96810c9d65d5f88d8eae4ba52.tar.gz
binaryen-0db7b571b23a09f96810c9d65d5f88d8eae4ba52.tar.bz2
binaryen-0db7b571b23a09f96810c9d65d5f88d8eae4ba52.zip
[NFC] Mention relevant flags in validator errors (#5203)
E.g. Atomic operation (atomics are disabled) => Atomic operations require threads [--enable-threads]
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/test_features.py21
1 files changed, 9 insertions, 12 deletions
diff --git a/test/unit/test_features.py b/test/unit/test_features.py
index 57a6bc555..d40eaf580 100644
--- a/test/unit/test_features.py
+++ b/test/unit/test_features.py
@@ -98,7 +98,7 @@ class FeatureValidationTest(utils.BinaryenTestCase):
)
)
'''
- self.check_simd(module, 'SIMD operation (SIMD is disabled)')
+ self.check_simd(module, 'SIMD operations require SIMD [--enable-simd]')
def test_simd_splat(self):
module = '''
@@ -130,7 +130,7 @@ class FeatureValidationTest(utils.BinaryenTestCase):
)
'''
self.check_bulk_mem(module,
- 'Bulk memory operation (bulk memory is disabled')
+ 'Bulk memory operations require bulk memory [--enable-bulk-memory]')
def test_bulk_mem_segment(self):
module = '''
@@ -139,7 +139,7 @@ class FeatureValidationTest(utils.BinaryenTestCase):
(data "42")
)
'''
- self.check_bulk_mem(module, 'nonzero segment flags (bulk memory is disabled)')
+ self.check_bulk_mem(module, 'nonzero segment flags require bulk memory [--enable-bulk-memory]')
def test_tail_call(self):
module = '''
@@ -150,7 +150,7 @@ class FeatureValidationTest(utils.BinaryenTestCase):
)
)
'''
- self.check_tail_call(module, 'return_call* requires tail calls to be enabled')
+ self.check_tail_call(module, 'return_call* requires tail calls [--enable-tail-call]')
def test_tail_call_indirect(self):
module = '''
@@ -164,7 +164,7 @@ class FeatureValidationTest(utils.BinaryenTestCase):
)
)
'''
- self.check_tail_call(module, 'return_call* requires tail calls to be enabled')
+ self.check_tail_call(module, 'return_call* requires tail calls [--enable-tail-call]')
def test_reference_types_externref(self):
module = '''
@@ -193,7 +193,7 @@ class FeatureValidationTest(utils.BinaryenTestCase):
)
)
'''
- self.check_exception_handling(module, 'Module has tags')
+ self.check_exception_handling(module, 'Tags require exception-handling [--enable-exception-handling]')
def test_multivalue_import(self):
module = '''
@@ -201,8 +201,7 @@ class FeatureValidationTest(utils.BinaryenTestCase):
(import "env" "foo" (func $foo (result i32 i64)))
)
'''
- self.check_multivalue(module, 'Imported multivalue function ' +
- '(multivalue is not enabled)')
+ self.check_multivalue(module, 'Imported multivalue function requires multivalue [--enable-multivalue]')
def test_multivalue_function(self):
module = '''
@@ -224,8 +223,7 @@ class FeatureValidationTest(utils.BinaryenTestCase):
(tag $foo (param i32 i64))
)
'''
- self.check_multivalue_exception_handling(module, 'Multivalue tag type ' +
- '(multivalue is not enabled)')
+ self.check_multivalue_exception_handling(module, 'Multivalue tag type requires multivalue [--enable-multivalue]')
def test_multivalue_block(self):
module = '''
@@ -242,8 +240,7 @@ class FeatureValidationTest(utils.BinaryenTestCase):
)
)
'''
- self.check_multivalue(module, 'Multivalue block type ' +
- '(multivalue is not enabled)')
+ self.check_multivalue(module, 'Multivalue block type require multivalue [--enable-multivalue]')
def test_i31_global(self):
module = '''