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

Function table_get

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

Source from the content-addressed store, hash-verified

125
126#[test]
127fn table_get() -> Result<()> {
128 let mut config = Config::new();
129 config.enable_compiler(false);
130 config.concurrency_support(false);
131 let engine = Engine::new(&config)?;
132
133 OomTest::new().allow_alloc_after_oom(true).test(|| {
134 let mut store = Store::try_new(&engine, ())?;
135 let ty = TableType::new(RefType::FUNCREF, 1, None);
136 let table = Table::new(&mut store, ty, Ref::Func(None))?;
137 let val = table.get(&mut store, 0);
138 assert!(val.is_some());
139 Ok(())
140 })
141}
142
143#[test]
144fn table_ty() -> Result<()> {

Callers

nothing calls this directly

Calls 9

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
getMethod · 0.45

Tested by

no test coverage detected