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

Function test_boolean_array_from_iter

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

Source from the content-addressed store, hash-verified

975
976 #[test]
977 fn test_boolean_array_from_iter() {
978 let v = vec![Some(false), Some(true), Some(false), Some(true)];
979 let arr = v.into_iter().collect::<BooleanArray>();
980 assert_eq!(4, arr.len());
981 assert_eq!(0, arr.offset());
982 assert_eq!(0, arr.null_count());
983 assert!(arr.nulls().is_none());
984 for i in 0..3 {
985 assert!(!arr.is_null(i));
986 assert!(arr.is_valid(i));
987 assert_eq!(i == 1 || i == 3, arr.value(i), "failed at {i}")
988 }
989 }
990
991 #[test]
992 fn test_boolean_array_from_non_nullable_iter() {

Callers

nothing calls this directly

Calls 1

into_iterMethod · 0.45

Tested by

no test coverage detected