summaryrefslogtreecommitdiff
path: root/test/unit/test_datacount.py
diff options
context:
space:
mode:
authorThomas Lively <tlively@google.com>2024-09-19 17:08:17 -0700
committerGitHub <noreply@github.com>2024-09-19 17:08:17 -0700
commit480f5ba352a9f89afe72779c81f8a16fd3c8ba4a (patch)
tree55eae60ae748233aa244a7afda693ca6b1927455 /test/unit/test_datacount.py
parent2711d4fe4b4514ea146e8810959a8f170c932591 (diff)
downloadbinaryen-480f5ba352a9f89afe72779c81f8a16fd3c8ba4a.tar.gz
binaryen-480f5ba352a9f89afe72779c81f8a16fd3c8ba4a.tar.bz2
binaryen-480f5ba352a9f89afe72779c81f8a16fd3c8ba4a.zip
[NFC] Eagerly create segments when parsing datacount (#6958)
The purpose of the datacount section is to pre-declare how many data segments there will be so that engines can allocate space for them and not have to back patch subsequent instructions in the code section that refer to them. Once we use IRBuilder in the binary parser, we will have to have the data segments available by the time we parse instructions that use them, so eagerly construct the data segments when parsing the datacount section.
Diffstat (limited to 'test/unit/test_datacount.py')
-rw-r--r--test/unit/test_datacount.py15
1 files changed, 0 insertions, 15 deletions
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)