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

Function test_empty_primitive

arrow-array/src/array/mod.rs:1091–1097  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1089
1090 #[test]
1091 fn test_empty_primitive() {
1092 let array = new_empty_array(&DataType::Int32);
1093 let a = array.as_any().downcast_ref::<Int32Array>().unwrap();
1094 assert_eq!(a.len(), 0);
1095 let expected: &[i32] = &[];
1096 assert_eq!(a.values(), expected);
1097 }
1098
1099 #[test]
1100 fn test_empty_variable_sized() {

Callers

nothing calls this directly

Calls 2

new_empty_arrayFunction · 0.85
as_anyMethod · 0.45

Tested by

no test coverage detected