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

Function externref_data_none_when_converted_from_anyref

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

Source from the content-addressed store, hash-verified

2598
2599#[test]
2600fn externref_data_none_when_converted_from_anyref() -> Result<()> {
2601 let mut store = gc_store()?;
2602 let any = AnyRef::from_i31(&mut store, I31::wrapping_u32(5));
2603 // ExternRef wrapping an anyref has no host data
2604 let ext = ExternRef::convert_any(&mut store, any)?;
2605 let data = ext.data(&store)?;
2606 assert!(data.is_none());
2607 Ok(())
2608}
2609
2610#[test]
2611fn externref_data_mut_none_when_converted_from_anyref() -> Result<()> {

Callers

nothing calls this directly

Calls 3

gc_storeFunction · 0.85
OkFunction · 0.85
dataMethod · 0.45

Tested by

no test coverage detected