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

Function anyref_ty_array

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

Source from the content-addressed store, hash-verified

2922
2923#[test]
2924fn anyref_ty_array() -> Result<()> {
2925 let mut store = gc_store()?;
2926 let array_ty = ArrayType::new(
2927 store.engine(),
2928 FieldType::new(Mutability::Const, ValType::I32.into()),
2929 );
2930 let pre = ArrayRefPre::new(&mut store, array_ty);
2931 let a = ArrayRef::new(&mut store, &pre, &Val::I32(0), 1)?;
2932 let any: Rooted<AnyRef> = a.into();
2933 let ty = any.ty(&store)?;
2934 assert!(matches!(ty, HeapType::ConcreteArray(_)));
2935 Ok(())
2936}
2937
2938#[test]
2939fn eqref_ty_i31() -> Result<()> {

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected