Skip to content

Commit

Permalink
Add a test
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrobbel committed Dec 8, 2023
1 parent 3c7169e commit f38d912
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions arrow-array/src/array/boolean_array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -634,5 +634,12 @@ mod tests {
assert_eq!(values.values(), &[0b0000_0001]);
assert!(nulls.is_some());
assert_eq!(nulls.unwrap().buffer().as_slice(), &[0b0000_0101]);

let boolean_array =
BooleanArray::from(vec![false, false, false, false, false, false, false, true]);
let (data_type, values, nulls) = boolean_array.into_parts();
assert_eq!(data_type, DataType::Boolean);
assert_eq!(values.values(), &[0b1000_0000]);
assert!(nulls.is_none());
}
}

0 comments on commit f38d912

Please sign in to comment.