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

Function gc_store_with_table_initializers

tests/all/table.rs:372–389  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

370#[test]
371#[cfg_attr(miri, ignore)]
372fn gc_store_with_table_initializers() -> Result<()> {
373 let mut config = Config::new();
374 config.wasm_gc(true);
375 config.wasm_function_references(true);
376 let engine = Engine::new(&config)?;
377
378 let test = |wat: &str| -> Result<()> {
379 let module = Module::new(&engine, wat)?;
380 Instance::new(&mut Store::new(&engine, ()), &module, &[])?;
381 Ok(())
382 };
383
384 test("(module (table 1 i31ref))")?;
385 test("(module (table 1 i31ref (ref.i31 (i32.const 1))))")?;
386 test("(module (table 1 i31ref (ref.null i31)))")?;
387
388 Ok(())
389}

Callers

nothing calls this directly

Calls 5

OkFunction · 0.85
testFunction · 0.70
newFunction · 0.50
wasm_gcMethod · 0.45

Tested by

no test coverage detected