()
| 510 | |
| 511 | #[test] |
| 512 | fn length_offsets_binary() { |
| 513 | let value: Vec<Option<&[u8]>> = vec![Some(b"hello"), Some(b" "), Some(&[0xff, 0xf8]), None]; |
| 514 | let a = BinaryArray::from(value); |
| 515 | let b = a.slice(1, 3); |
| 516 | let result = length(&b).unwrap(); |
| 517 | let result: &Int32Array = result.as_primitive(); |
| 518 | |
| 519 | let expected = Int32Array::from(vec![Some(1), Some(2), None]); |
| 520 | assert_eq!(&expected, result); |
| 521 | } |
| 522 | |
| 523 | fn bit_length_cases() -> Vec<(Vec<&'static str>, usize, Vec<i32>)> { |
| 524 | // a large array |
nothing calls this directly
no test coverage detected