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

Function anyref_unwrap_array

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

Source from the content-addressed store, hash-verified

2772
2773#[test]
2774fn anyref_unwrap_array() -> Result<()> {
2775 let mut store = gc_store()?;
2776 let array_ty = ArrayType::new(
2777 store.engine(),
2778 FieldType::new(Mutability::Const, ValType::I32.into()),
2779 );
2780 let pre = ArrayRefPre::new(&mut store, array_ty);
2781 let a = ArrayRef::new(&mut store, &pre, &Val::I32(0), 1)?;
2782 let any: Rooted<AnyRef> = a.into();
2783 let _a2 = any.unwrap_array(&store)?;
2784 Ok(())
2785}
2786
2787#[test]
2788fn anyref_matches_ty_any_and_eq() -> Result<()> {

Callers

nothing calls this directly

Calls 5

gc_storeFunction · 0.85
OkFunction · 0.85
newFunction · 0.50
engineMethod · 0.45
unwrap_arrayMethod · 0.45

Tested by

no test coverage detected