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

Function array_new_fixed_cross_store_pre

tests/all/arrays.rs:159–170  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

157#[test]
158#[should_panic = "wrong store"]
159fn array_new_fixed_cross_store_pre() {
160 let mut store1 = gc_store().unwrap();
161 let mut store2 = gc_store().unwrap();
162
163 let array_ty = ArrayType::new(
164 store1.engine(),
165 FieldType::new(Mutability::Var, StorageType::ValType(ValType::ANYREF)),
166 );
167 let pre = ArrayRefPre::new(&mut store2, array_ty);
168
169 ArrayRef::new_fixed(&mut store1, &pre, &[Val::I32(0)]).unwrap();
170}
171
172#[test]
173fn anyref_as_array() -> Result<()> {

Callers

nothing calls this directly

Calls 5

gc_storeFunction · 0.85
newFunction · 0.50
ValTypeEnum · 0.50
unwrapMethod · 0.45
engineMethod · 0.45

Tested by

no test coverage detected