()
| 976 | |
| 977 | #[test] |
| 978 | fn test_time32() -> Result<()> { |
| 979 | // create an array natively |
| 980 | let array = Time32MillisecondArray::from(vec![None, Some(1), Some(2)]); |
| 981 | |
| 982 | // export it |
| 983 | let (array, schema) = to_ffi(&array.to_data())?; |
| 984 | |
| 985 | // (simulate consumer) import it |
| 986 | let data = unsafe { from_ffi(array, &schema) }?; |
| 987 | let array = make_array(data); |
| 988 | let array = array |
| 989 | .as_any() |
| 990 | .downcast_ref::<Time32MillisecondArray>() |
| 991 | .unwrap(); |
| 992 | |
| 993 | // verify |
| 994 | assert_eq!( |
| 995 | array, |
| 996 | &Time32MillisecondArray::from(vec![None, Some(1), Some(2)]) |
| 997 | ); |
| 998 | |
| 999 | // (drop/release) |
| 1000 | Ok(()) |
| 1001 | } |
| 1002 | |
| 1003 | #[test] |
| 1004 | fn test_timestamp() -> Result<()> { |
nothing calls this directly
no test coverage detected