Lines Matching refs:array

12     let array = ArrayRef::new(&mut store, &pre, &Val::I32(0), 0)?;  in array_new_empty()  localVariable
13 assert_eq!(array.len(&store)?, 0); in array_new_empty()
25 let array = ArrayRef::new(&mut store, &pre, &Val::I32(99), 3)?; in array_new_with_elems() localVariable
26 assert_eq!(array.len(&store)?, 3); in array_new_with_elems()
28 assert_eq!(array.get(&mut store, i)?.unwrap_i32(), 99); in array_new_with_elems()
93 let array = ArrayRef::new_fixed(&mut store, &pre, &[])?; in array_new_fixed_empty() localVariable
94 assert_eq!(array.len(&store)?, 0); in array_new_fixed_empty()
106 let array = ArrayRef::new_fixed( in array_new_fixed_with_elems() localVariable
111 assert_eq!(array.len(&store)?, 3); in array_new_fixed_with_elems()
113 assert_eq!(array.get(&mut store, i)?.unwrap_i32(), (i as i32 + 1) * 11); in array_new_fixed_with_elems()
203 let array = ArrayRef::new_fixed(&mut store, &pre, &[])?; in array_len_empty() localVariable
204 assert_eq!(array.len(&store)?, 0); in array_len_empty()
219 let array = ArrayRef::new_fixed( in array_len_non_empty() localVariable
224 assert_eq!(array.len(&store)?, 3); in array_len_non_empty()
239 let array = ArrayRef::new_fixed( in array_get_in_bounds() localVariable
245 assert_eq!(array.get(&mut store, 0)?.unwrap_i32(), 11); in array_get_in_bounds()
246 assert_eq!(array.get(&mut store, 1)?.unwrap_i32(), 22); in array_get_in_bounds()
247 assert_eq!(array.get(&mut store, 2)?.unwrap_i32(), 33); in array_get_in_bounds()
262 let array = ArrayRef::new_fixed( in array_get_out_of_bounds() localVariable
268 assert!(array.get(&mut store, 3).is_err()); in array_get_out_of_bounds()
269 assert!(array.get(&mut store, 4).is_err()); in array_get_out_of_bounds()
284 let array = { in array_get_on_unrooted() localVariable
289 assert!(array.get(&mut store, 0).is_err()); in array_get_on_unrooted()
305 let array = ArrayRef::new_fixed(&mut store1, &pre, &[Val::I32(11)]).unwrap(); in array_get_wrong_store() localVariable
308 let _ = array.get(&mut store2, 0); in array_get_wrong_store()
321 let array = ArrayRef::new_fixed(&mut store, &pre, &[Val::I32(11)])?; in array_set_in_bounds() localVariable
323 assert_eq!(array.get(&mut store, 0)?.unwrap_i32(), 11); in array_set_in_bounds()
324 array.set(&mut store, 0, Val::I32(22))?; in array_set_in_bounds()
325 assert_eq!(array.get(&mut store, 0)?.unwrap_i32(), 22); in array_set_in_bounds()
340 let array = ArrayRef::new_fixed(&mut store, &pre, &[Val::I32(11)])?; in array_set_out_of_bounds() localVariable
342 assert!(array.set(&mut store, 1, Val::I32(22)).is_err()); in array_set_out_of_bounds()
343 assert!(array.set(&mut store, 2, Val::I32(33)).is_err()); in array_set_out_of_bounds()
358 let array = { in array_set_on_unrooted() localVariable
363 assert!(array.set(&mut store, 0, Val::I32(22)).is_err()); in array_set_on_unrooted()
377 let array = ArrayRef::new_fixed(&mut store, &pre, &[Val::AnyRef(None)])?; in array_set_given_unrooted() localVariable
384 assert!(array.set(&mut store, 0, anyref.into()).is_err()); in array_set_given_unrooted()
400 let array = ArrayRef::new_fixed(&mut store1, &pre, &[Val::AnyRef(None)]).unwrap(); in array_set_cross_store_value() localVariable
405 let _ = array.set(&mut store1, 0, anyref.into()); in array_set_cross_store_value()
418 let array = ArrayRef::new_fixed( in array_set_immutable_elems() localVariable
424 assert!(array.set(&mut store, 0, Val::I32(22)).is_err()); in array_set_immutable_elems()
425 assert!(array.set(&mut store, 1, Val::I32(33)).is_err()); in array_set_immutable_elems()
426 assert!(array.set(&mut store, 2, Val::I32(44)).is_err()); in array_set_immutable_elems()
441 let array = ArrayRef::new_fixed(&mut store, &pre, &[Val::I32(11)])?; in array_set_wrong_field_type() localVariable
443 assert!(array.set(&mut store, 0, Val::I64(22)).is_err()); in array_set_wrong_field_type()
484 let array = ArrayRef::new_fixed(&mut store, &pre, &[])?; in array_elems_empty() localVariable
485 let mut elems = array.elems(&mut store)?; in array_elems_empty()
499 let array = ArrayRef::new_fixed( in array_elems_non_empty() localVariable
504 let mut elems = array.elems(&mut store)?; in array_elems_non_empty()
521 let array = { in array_elems_unrooted() localVariable
525 assert!(array.elems(&mut store).is_err()); in array_elems_unrooted()