diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/lit/binary/bad-datacount.test | 9 | ||||
-rwxr-xr-x | test/lit/binary/bad-datacount.test.wasm (renamed from test/unit/input/bulkmem_bad_datacount.wasm) | bin | 177 -> 177 bytes | |||
-rw-r--r-- | test/unit/test_datacount.py | 15 |
3 files changed, 9 insertions, 15 deletions
diff --git a/test/lit/binary/bad-datacount.test b/test/lit/binary/bad-datacount.test new file mode 100644 index 000000000..27e0c72a3 --- /dev/null +++ b/test/lit/binary/bad-datacount.test @@ -0,0 +1,9 @@ +RUN: not wasm-opt --debug %s.wasm 2>&1 | filecheck %s + +;; Check that we get the expected error. + +;; CHECK: data count and data sections disagree on size + +;; Check that we print out the module rather than hitting an assertion error. + +;; CHECK: (module diff --git a/test/unit/input/bulkmem_bad_datacount.wasm b/test/lit/binary/bad-datacount.test.wasm Binary files differindex e7b6e4bb7..e7b6e4bb7 100755 --- a/test/unit/input/bulkmem_bad_datacount.wasm +++ b/test/lit/binary/bad-datacount.test.wasm diff --git a/test/unit/test_datacount.py b/test/unit/test_datacount.py deleted file mode 100644 index b996865a5..000000000 --- a/test/unit/test_datacount.py +++ /dev/null @@ -1,15 +0,0 @@ -from scripts.test import shared -from . import utils - - -class DataCountTest(utils.BinaryenTestCase): - def test_datacount(self): - self.roundtrip('bulkmem_data.wasm') - - def test_bad_datacount(self): - path = self.input_path('bulkmem_bad_datacount.wasm') - p = shared.run_process(shared.WASM_OPT + ['-g', '-o', '-', path], - check=False, capture_output=True) - self.assertNotEqual(p.returncode, 0) - self.assertIn('Number of segments does not agree with DataCount section', - p.stderr) |