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

Function array_len_empty

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

Source from the content-addressed store, hash-verified

194
195#[test]
196fn array_len_empty() -> Result<()> {
197 let mut store = gc_store()?;
198
199 let array_ty = ArrayType::new(
200 store.engine(),
201 FieldType::new(Mutability::Const, ValType::I32.into()),
202 );
203 let pre = ArrayRefPre::new(&mut store, array_ty);
204
205 let array = ArrayRef::new_fixed(&mut store, &pre, &[])?;
206 assert_eq!(array.len(&store)?, 0);
207
208 Ok(())
209}
210
211#[test]
212fn array_len_non_empty() -> 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