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

Function anyref_ty_extern_converted

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

Source from the content-addressed store, hash-verified

2548
2549#[test]
2550fn anyref_ty_extern_converted() -> Result<()> {
2551 let mut store = gc_store()?;
2552 // ExternRef converted to AnyRef has HeapType::Any
2553 let ext = ExternRef::new(&mut store, 42u32)?;
2554 let any = AnyRef::convert_extern(&mut store, ext)?;
2555 let ty = any.ty(&store)?;
2556 assert!(matches!(ty, HeapType::Any));
2557 Ok(())
2558}
2559
2560#[test]
2561fn anyref_to_raw_struct() -> Result<()> {

Callers

nothing calls this directly

Calls 4

gc_storeFunction · 0.85
OkFunction · 0.85
newFunction · 0.50
tyMethod · 0.45

Tested by

no test coverage detected