(engine: &Engine, num_funcs: u64)
| 213 | } |
| 214 | |
| 215 | fn module(engine: &Engine, num_funcs: u64) -> Result<Module> { |
| 216 | let mut wat = String::new(); |
| 217 | wat.push_str("(module\n"); |
| 218 | for i in 0..num_funcs { |
| 219 | let j = i + 1; |
| 220 | wat.push_str(&format!("(func $f{i} call $f{j})\n")); |
| 221 | } |
| 222 | wat.push_str(&format!("(func $f{num_funcs} unreachable)\n")); |
| 223 | wat.push_str(&format!("(export \"\" (func $f0))\n")); |
| 224 | wat.push_str(")\n"); |
| 225 | |
| 226 | Module::new(engine, &wat) |
| 227 | } |
no test coverage detected