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

Function externref_data_some

tests/all/gc.rs:2577–2584  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2575
2576#[test]
2577fn externref_data_some() -> Result<()> {
2578 let mut store = gc_store()?;
2579 let rooted = ExternRef::new(&mut store, 100u32)?;
2580 let data = rooted.data(&store)?;
2581 let val = data.unwrap().downcast_ref::<u32>().unwrap();
2582 assert_eq!(*val, 100u32);
2583 Ok(())
2584}
2585
2586#[test]
2587fn externref_data_mut_some() -> Result<()> {

Callers

nothing calls this directly

Calls 5

gc_storeFunction · 0.85
OkFunction · 0.85
newFunction · 0.50
dataMethod · 0.45
unwrapMethod · 0.45

Tested by

no test coverage detected