()
| 953 | |
| 954 | #[test] |
| 955 | fn arrayref_ty() -> Result<()> { |
| 956 | let mut store = gc_store()?; |
| 957 | let array_ty = ArrayType::new( |
| 958 | store.engine(), |
| 959 | FieldType::new(Mutability::Const, ValType::I32.into()), |
| 960 | ); |
| 961 | let pre = ArrayRefPre::new(&mut store, array_ty.clone()); |
| 962 | let a = ArrayRef::new(&mut store, &pre, &Val::I32(0), 3)?; |
| 963 | |
| 964 | let ty = a.ty(&store)?; |
| 965 | assert!(matches!(ty.element_type(), StorageType::ValType(_))); |
| 966 | |
| 967 | Ok(()) |
| 968 | } |
| 969 | |
| 970 | #[test] |
| 971 | fn arrayref_matches_ty() -> Result<()> { |