()
| 86 | |
| 87 | #[test] |
| 88 | fn 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] |
| 101 | fn array_new_fixed_with_elems() -> Result<()> { |