MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / func_ty

Function func_ty

crates/fuzzing/tests/oom/func.rs:166–180  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

164
165#[test]
166fn func_ty() -> Result<()> {
167 let mut config = Config::new();
168 config.enable_compiler(false);
169 config.concurrency_support(false);
170 let engine = Engine::new(&config)?;
171
172 OomTest::new().test(|| {
173 let mut store = Store::try_new(&engine, ())?;
174 let func = Func::try_wrap(&mut store, |x: i32| x * 2)?;
175 let ty = func.ty(&store);
176 assert_eq!(ty.params().len(), 1);
177 assert_eq!(ty.results().len(), 1);
178 Ok(())
179 })
180}

Callers

nothing calls this directly

Calls 7

OkFunction · 0.85
enable_compilerMethod · 0.80
newFunction · 0.50
try_newFunction · 0.50
concurrency_supportMethod · 0.45
testMethod · 0.45
tyMethod · 0.45

Tested by

no test coverage detected