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

Function eqref_unwrap_array

tests/all/eqref.rs:270–281  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

268
269#[test]
270fn eqref_unwrap_array() -> Result<()> {
271 let mut store = gc_store()?;
272 let array_ty = ArrayType::new(
273 store.engine(),
274 FieldType::new(Mutability::Const, ValType::I32.into()),
275 );
276 let pre = ArrayRefPre::new(&mut store, array_ty);
277 let a = ArrayRef::new(&mut store, &pre, &Val::I32(5), 3)?;
278 let eq: Rooted<EqRef> = a.into();
279 let _a2 = eq.unwrap_array(&store)?;
280 Ok(())
281}
282
283#[test]
284fn eqref_matches_ty_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