()
| 1430 | /// 3) All large values (> INLINE_LEN): each must be copied into the new data buffer |
| 1431 | #[test] |
| 1432 | fn test_gc_all_large() { |
| 1433 | let mut builder = StringViewBuilder::new().with_fixed_block_size(BLOCK_SIZE); |
| 1434 | let large_str = "X".repeat(MAX_INLINE_VIEW_LEN as usize + 5); |
| 1435 | // append multiple large strings |
| 1436 | for _ in 0..50 { |
| 1437 | builder.append_option(Some(&large_str)); |
| 1438 | } |
| 1439 | let array = builder.finish(); |
| 1440 | let gced = array.gc(); |
| 1441 | // New data buffers should be populated (one or more blocks) |
| 1442 | assert!( |
| 1443 | !gced.data_buffers().is_empty(), |
| 1444 | "Expected data buffers for large values" |
| 1445 | ); |
| 1446 | assert_eq!(gced.len(), 50); |
| 1447 | // verify that every large string emerges unchanged |
| 1448 | array.iter().zip(gced.iter()).for_each(|(orig, got)| { |
| 1449 | assert_eq!(orig, got, "Large view mismatch after gc"); |
| 1450 | }); |
| 1451 | } |
| 1452 | |
| 1453 | /// 4) All null elements: ensure null bitmap handling path is correct |
| 1454 | #[test] |
nothing calls this directly
no test coverage detected