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

Function array_new_fixed_empty

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

Source from the content-addressed store, hash-verified

86
87#[test]
88fn array_new_fixed_empty() -> Result<()> {
89 let mut store = gc_store()?;
90 let array_ty = ArrayType::new(
91 store.engine(),
92 FieldType::new(Mutability::Const, ValType::I32.into()),
93 );
94 let pre = ArrayRefPre::new(&mut store, array_ty);
95 let array = ArrayRef::new_fixed(&mut store, &pre, &[])?;
96 assert_eq!(array.len(&store)?, 0);
97 Ok(())
98}
99
100#[test]
101fn array_new_fixed_with_elems() -> 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