binaryen/test/unit/test_fuzz_empty_data.py
Heejin Ahn 3352e23d5a
[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.
2021-12-28 17:03:40 -08:00

15 lines
401 B
Python

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)