From db1e931a640a307958747c1220331a410c80e9db Mon Sep 17 00:00:00 2001 From: mohanson Date: Fri, 15 Nov 2024 10:09:59 +0800 Subject: [PATCH] Passed the unlinkable test --- test/test_spec.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/test_spec.py b/test/test_spec.py index 98ac5ab..d6ebfa8 100644 --- a/test/test_spec.py +++ b/test/test_spec.py @@ -217,7 +217,14 @@ def host(runtime: pywasm.core.Runtime) -> typing.Dict[str, typing.Dict[str, pywa else: assert 0 case 'assert_unlinkable': - assert 1 + try: + lmodule = runtime.instance_from_file(f'res/spectest/{elem['filename']}') + except: + runtime.machine.stack.frame.clear() + runtime.machine.stack.label.clear() + runtime.machine.stack.value.clear() + else: + assert 0 case 'module': lmodule = runtime.instance_from_file(f'res/spectest/{elem['filename']}') if 'name' in elem: