()
| 1002 | |
| 1003 | #[test] |
| 1004 | fn test_timestamp() -> Result<()> { |
| 1005 | // create an array natively |
| 1006 | let array = TimestampMillisecondArray::from(vec![None, Some(1), Some(2)]); |
| 1007 | |
| 1008 | // export it |
| 1009 | let (array, schema) = to_ffi(&array.to_data())?; |
| 1010 | |
| 1011 | // (simulate consumer) import it |
| 1012 | let data = unsafe { from_ffi(array, &schema) }?; |
| 1013 | let array = make_array(data); |
| 1014 | let array = array |
| 1015 | .as_any() |
| 1016 | .downcast_ref::<TimestampMillisecondArray>() |
| 1017 | .unwrap(); |
| 1018 | |
| 1019 | // verify |
| 1020 | assert_eq!( |
| 1021 | array, |
| 1022 | &TimestampMillisecondArray::from(vec![None, Some(1), Some(2)]) |
| 1023 | ); |
| 1024 | |
| 1025 | // (drop/release) |
| 1026 | Ok(()) |
| 1027 | } |
| 1028 | |
| 1029 | #[test] |
| 1030 | fn test_fixed_size_binary_array() -> Result<()> { |
nothing calls this directly
no test coverage detected