diff options
Diffstat (limited to 'test/unit/test_features.py')
-rw-r--r-- | test/unit/test_features.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/unit/test_features.py b/test/unit/test_features.py index cbdae1c56..d2d72a8e4 100644 --- a/test/unit/test_features.py +++ b/test/unit/test_features.py @@ -51,6 +51,12 @@ class FeatureValidationTest(utils.BinaryenTestCase): self.check_feature(module, error, '--enable-gc', ['--enable-reference-types']) + def check_typed_continuations(self, module, error): + # Typed continuations implies function references (which is provided by + # gc in binaryen, and implies reference types) and exceptions + self.check_feature(module, error, '--enable-typed-continuations', + ['--enable-gc', '--enable-reference-types', '--enable-exception-handling']) + def test_v128_signature(self): module = ''' (module @@ -278,6 +284,16 @@ class FeatureValidationTest(utils.BinaryenTestCase): ''' self.check_gc(module, 'all used types should be allowed') + def test_tag_results(self): + module = ''' + (module + (tag $foo (result i32)) + ) + ''' + self.check_typed_continuations(module, + 'Tags with result types require typed ' + 'continuations feature [--enable-typed-continuations]') + class TargetFeaturesSectionTest(utils.BinaryenTestCase): def test_atomics(self): |