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

Function table_size

crates/fuzzing/tests/oom/table.rs:160–173  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

158
159#[test]
160fn table_size() -> Result<()> {
161 let mut config = Config::new();
162 config.enable_compiler(false);
163 config.concurrency_support(false);
164 let engine = Engine::new(&config)?;
165
166 OomTest::new().allow_alloc_after_oom(true).test(|| {
167 let mut store = Store::try_new(&engine, ())?;
168 let ty = TableType::new(RefType::FUNCREF, 2, None);
169 let table = Table::new(&mut store, ty, Ref::Func(None))?;
170 assert_eq!(table.size(&store), 2);
171 Ok(())
172 })
173}

Callers

nothing calls this directly

Calls 8

OkFunction · 0.85
enable_compilerMethod · 0.80
allow_alloc_after_oomMethod · 0.80
newFunction · 0.50
try_newFunction · 0.50
FuncClass · 0.50
concurrency_supportMethod · 0.45
testMethod · 0.45

Tested by

no test coverage detected