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

Function array_len_non_empty

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

Source from the content-addressed store, hash-verified

210
211#[test]
212fn array_len_non_empty() -> Result<()> {
213 let mut store = gc_store()?;
214
215 let array_ty = ArrayType::new(
216 store.engine(),
217 FieldType::new(Mutability::Const, ValType::I32.into()),
218 );
219 let pre = ArrayRefPre::new(&mut store, array_ty);
220
221 let array = ArrayRef::new_fixed(
222 &mut store,
223 &pre,
224 &[Val::I32(11), Val::I32(22), Val::I32(33)],
225 )?;
226 assert_eq!(array.len(&store)?, 3);
227
228 Ok(())
229}
230
231#[test]
232fn array_get_in_bounds() -> Result<()> {

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected