summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/unit/test_web_limitations.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/unit/test_web_limitations.py b/test/unit/test_web_limitations.py
new file mode 100644
index 000000000..6359390f9
--- /dev/null
+++ b/test/unit/test_web_limitations.py
@@ -0,0 +1,22 @@
+import os
+
+from scripts.test import shared
+from . import utils
+
+
+class WebLimitations(utils.BinaryenTestCase):
+ def test_many_params(self):
+ """Test that we warn on large numbers of parameters, which Web VMs
+ disallow."""
+
+ params = '(param i32) ' * 1001
+ module = '''
+ (module
+ (func $foo %s
+ )
+ )
+ ''' % params
+ p = shared.run_process(shared.WASM_OPT + ['-o', os.devnull],
+ input=module, capture_output=True)
+ self.assertIn('Some VMs may not accept this binary because it has a large number of parameters in function foo.',
+ p.stderr)