diff options
author | Heejin Ahn <aheejin@gmail.com> | 2021-12-28 17:03:40 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-28 17:03:40 -0800 |
commit | 3352e23d5aea9c8fc24147ae6210c7fcee2db0fc (patch) | |
tree | e4a198be5f2beecdac7b0ef70ba3dd5bf2364aeb /test | |
parent | db23896425e78fbccff5ac3e4ec1799097cf3cac (diff) | |
download | binaryen-3352e23d5aea9c8fc24147ae6210c7fcee2db0fc.tar.gz binaryen-3352e23d5aea9c8fc24147ae6210c7fcee2db0fc.tar.bz2 binaryen-3352e23d5aea9c8fc24147ae6210c7fcee2db0fc.zip |
[Fuzzer] Allow empty data in --translate-to-fuzz (#4406)
When a parameter and a member variable have the same name within a
constructor, to access (and change) the member variable, we need to
either use `this->` or change the name of the parameter. The current
code ended up changing the parameter and didn't affect the status of the
member variable, which remained empty.
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/test_fuzz_empty_data.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/unit/test_fuzz_empty_data.py b/test/unit/test_fuzz_empty_data.py new file mode 100644 index 000000000..3206fcead --- /dev/null +++ b/test/unit/test_fuzz_empty_data.py @@ -0,0 +1,14 @@ +import os +import tempfile +from scripts.test import shared +from . import utils + + +class EmptyDataFuzzTest(utils.BinaryenTestCase): + def test_empty_data(self): + try: + temp = tempfile.NamedTemporaryFile(delete=False).name + shared.run_process(shared.WASM_OPT + ['-ttf', temp], + capture_output=True) + finally: + os.unlink(temp) |