Meta+LibWasm: Generate calls to functions when they don't have results

This commit is contained in:
Ali Mohammad Pur 2021-07-06 11:53:39 +04:30 committed by Ali Mohammad Pur
parent e3ef241108
commit 963f5e69e0
Notes: sideshowbarker 2024-07-18 10:18:43 +09:00

View file

@ -295,8 +295,8 @@ def genresult(ident, entry):
if entry['kind'] == 'return':
return (
f'let {ident}_result = {expectation};\n '
f'expect({ident}_result).toBe({genarg(entry["result"])})\n ' if entry["result"] is not None else ''
f'let {ident}_result = {expectation};\n ' +
(f'expect({ident}_result).toBe({genarg(entry["result"])})\n ' if entry["result"] is not None else '')
)
if entry['kind'] == 'trap':