MCPcopy Create free account
hub / github.com/explodingcamera/tinywasm / module_cases

Function module_cases

crates/tinywasm/tests/host_func_signature_check.rs:16–27  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

14];
15
16fn module_cases() -> Vec<(Module, FuncType, Vec<WasmValue>)> {
17 let mut cases = Vec::<(Module, FuncType, Vec<WasmValue>)>::new();
18 for results in VAL_LISTS {
19 for params in VAL_LISTS {
20 let param_tys = params.iter().map(WasmType::from).collect::<Vec<_>>();
21 let result_tys = results.iter().map(WasmType::from).collect::<Vec<_>>();
22 let func_ty = FuncType::new(&param_tys, &result_tys);
23 cases.push((proxy_module(&func_ty), func_ty, params.to_vec()));
24 }
25 }
26 cases
27}
28
29#[test]
30fn test_return_invalid_type() -> Result<()> {

Calls 3

proxy_moduleFunction · 0.85
mapMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected