Skip to content

Commit 705bf80

Browse files
authored
Remove deprecated tests in language-bindings python (#3018)
After PR #2922, the caller of wasm-c-api wasm_func_call should ensure the params and results are correctly created, runtime doesn't check their format again.
1 parent c9fd44e commit 705bf80

File tree

1 file changed

+0
-32
lines changed

1 file changed

+0
-32
lines changed

language-bindings/python/wasm-c-api/tests/test_advanced.py

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -188,18 +188,6 @@ def test_wasm_func_call_native(self):
188188
ffi.wasm_func_call(func, params, results)
189189
self.assertEqual(params.data[0].of.f32 * 2, results.data[0].of.f64)
190190

191-
def test_wasm_func_call_wrong_params(self):
192-
export_list = ffi.wasm_vec_to_list(self.exports)
193-
func = ffi.wasm_extern_as_func(export_list[0])
194-
# make a call
195-
params = ffi.wasm_val_vec_t()
196-
ffi.wasm_val_vec_new_empty(params)
197-
results = ffi.wasm_val_vec_t()
198-
ffi.wasm_val_vec_new_empty(results)
199-
trap = ffi.wasm_func_call(func, params, results)
200-
201-
self.assertIsNotNullPointer(trap)
202-
203191
def test_wasm_func_call_unlinked(self):
204192
ft = ffi.wasm_functype_new_0_0()
205193
func = ffi.wasm_func_new(self._wasm_store, ft, callback)
@@ -453,26 +441,6 @@ def test_wasm_memory_data_size_unlinked(self):
453441
ffi.wasm_memory_data_size(mem)
454442
ffi.wasm_memory_delete(mem)
455443

456-
def test_wasm_trap(self):
457-
export_list = ffi.wasm_vec_to_list(self.exports)
458-
func = ffi.wasm_extern_as_func(export_list[0])
459-
# make a call
460-
params = ffi.wasm_val_vec_t()
461-
ffi.wasm_val_vec_new_empty(params)
462-
results = ffi.wasm_val_vec_t()
463-
ffi.wasm_val_vec_new_empty(results)
464-
465-
trap = ffi.wasm_func_call(func, params, results)
466-
self.assertIsNotNullPointer(trap)
467-
468-
message = ffi.wasm_message_t()
469-
ffi.wasm_trap_message(trap, message)
470-
self.assertIsNotNullPointer(c.pointer(message))
471-
472-
# not a function internal exception
473-
frame = ffi.wasm_trap_origin(trap)
474-
self.assertIsNullPointer(frame)
475-
476444
@unittest.skipUnless(
477445
TEST_WITH_WAMR_BUILD_DUMP_CALL_STACK,
478446
"need to enable WAMR_BUILD_DUMP_CALL_STACK",

0 commit comments

Comments
 (0)