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

Function arrayref_ty

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

Source from the content-addressed store, hash-verified

953
954#[test]
955fn arrayref_ty() -> Result<()> {
956 let mut store = gc_store()?;
957 let array_ty = ArrayType::new(
958 store.engine(),
959 FieldType::new(Mutability::Const, ValType::I32.into()),
960 );
961 let pre = ArrayRefPre::new(&mut store, array_ty.clone());
962 let a = ArrayRef::new(&mut store, &pre, &Val::I32(0), 3)?;
963
964 let ty = a.ty(&store)?;
965 assert!(matches!(ty.element_type(), StorageType::ValType(_)));
966
967 Ok(())
968}
969
970#[test]
971fn arrayref_matches_ty() -> Result<()> {

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected