diff options
author | Alon Zakai <azakai@google.com> | 2022-10-17 13:47:40 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-17 20:47:40 +0000 |
commit | a60a7167e202003ec1fbea5405ee53e80fd85e21 (patch) | |
tree | e36b38c40af5a00e4260ddf07e1d2728c9f3219a /test/unit/test_only_imported_memory.py | |
parent | 3e44a9fc542572592ee1ee1bdec19bf1904faaa3 (diff) | |
download | binaryen-a60a7167e202003ec1fbea5405ee53e80fd85e21.tar.gz binaryen-a60a7167e202003ec1fbea5405ee53e80fd85e21.tar.bz2 binaryen-a60a7167e202003ec1fbea5405ee53e80fd85e21.zip |
Binary format: Don't emit empty Memory sections (#5145)
If the only memories are imported, we don't need the section. We were already
doing that for tables, functions, etc.
Diffstat (limited to 'test/unit/test_only_imported_memory.py')
-rw-r--r-- | test/unit/test_only_imported_memory.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/unit/test_only_imported_memory.py b/test/unit/test_only_imported_memory.py new file mode 100644 index 000000000..427f464d0 --- /dev/null +++ b/test/unit/test_only_imported_memory.py @@ -0,0 +1,8 @@ +from . import utils + + +class OnlyImportedMemoryTest(utils.BinaryenTestCase): + def test_only_imported_memory(self): + # We should not create a memories section for a file with only an + # imported memory: such a module has no declared memories. + self.roundtrip('only-imported-memory.wasm', debug=False) |