()
| 317 | |
| 318 | #[test] |
| 319 | fn struct_fields_empty() -> Result<()> { |
| 320 | let mut store = gc_store()?; |
| 321 | let struct_ty = StructType::new(store.engine(), [])?; |
| 322 | let pre = StructRefPre::new(&mut store, struct_ty.clone()); |
| 323 | let s = StructRef::new(&mut store, &pre, &[])?; |
| 324 | let fields = s.fields(&mut store)?; |
| 325 | assert_eq!(fields.len(), 0); |
| 326 | assert!(fields.collect::<Vec<_>>().is_empty()); |
| 327 | Ok(()) |
| 328 | } |
| 329 | |
| 330 | #[test] |
| 331 | fn struct_fields_non_empty() -> Result<()> { |