diff options
author | Sam Clegg <sbc@chromium.org> | 2020-12-18 10:20:59 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-18 10:20:59 -0800 |
commit | dc4288cea1e403f011ec4ad7539df0f1b4dfdf47 (patch) | |
tree | 8ffca84e9fc4ebda0daa7c2f0bae513a0a5aea63 /test/unit/test_memory_packing.py | |
parent | 97fcd64de4b2b438a638feac2ad99b1d910ed431 (diff) | |
download | binaryen-dc4288cea1e403f011ec4ad7539df0f1b4dfdf47.tar.gz binaryen-dc4288cea1e403f011ec4ad7539df0f1b4dfdf47.tar.bz2 binaryen-dc4288cea1e403f011ec4ad7539df0f1b4dfdf47.zip |
MemoryPacking: Preserve segment names (#3458)
Also, avoid packing builtin llvm segments names so that
segments such as `__llvm_covfun` (use by llvm-cov) are
preserved in the final output.
Diffstat (limited to 'test/unit/test_memory_packing.py')
-rw-r--r-- | test/unit/test_memory_packing.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/test/unit/test_memory_packing.py b/test/unit/test_memory_packing.py index 357752f10..e2468e689 100644 --- a/test/unit/test_memory_packing.py +++ b/test/unit/test_memory_packing.py @@ -13,7 +13,7 @@ class MemoryPackingTest(utils.BinaryenTestCase): module = ''' (module (memory 256 256) - (data (i32.const 0) %s) + (data $d (i32.const 0) %s) ) ''' % data opts = ['--memory-packing', '--disable-bulk-memory', '--print', @@ -21,9 +21,10 @@ class MemoryPackingTest(utils.BinaryenTestCase): p = shared.run_process(shared.WASM_OPT + opts, input=module, check=False, capture_output=True) output = [ - '(data (i32.const 999970) "A")', - '(data (i32.const 999980) "A")', - '(data (i32.const 999990) "A' + ('\\00' * 9) + 'A")' + '(data $d (i32.const 0) "A")', + '(data $d.1 (i32.const 10) "A")', + '(data $d.99998 (i32.const 999980) "A")', + '(data $d.99999 (i32.const 999990) "A' + ('\\00' * 9) + 'A")' ] self.assertEqual(p.returncode, 0) for line in output: |