MCPcopy Create free account
hub / github.com/apache/arrow-rs / test_bitwise_unary_sliced

Function test_bitwise_unary_sliced

arrow-array/src/array/boolean_array.rs:1522–1532  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1520
1521 #[test]
1522 fn test_bitwise_unary_sliced() {
1523 // Slicing creates a non-zero offset into the underlying buffer.
1524 let arr = BooleanArray::from(vec![true, false, true, true, false]);
1525 let sliced = arr.slice(1, 3); // [false, true, true]
1526
1527 let result = sliced.bitwise_unary(|x| !x);
1528 assert_eq!(result.len(), 3);
1529 assert!(result.value(0));
1530 assert!(!result.value(1));
1531 assert!(!result.value(2));
1532 }
1533
1534 #[test]
1535 fn test_bitwise_unary_mut_sliced() {

Callers

nothing calls this directly

Calls 2

bitwise_unaryMethod · 0.80
sliceMethod · 0.45

Tested by

no test coverage detected