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

Function test_timestamp_func

arrow-array/src/temporal_conversions.rs:318–332  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

316
317 #[test]
318 fn test_timestamp_func() {
319 let timestamp = 1234;
320 let datetime = timestamp_s_to_datetime(timestamp).unwrap();
321 let expected_date = datetime.date();
322 let expected_time = datetime.time();
323
324 assert_eq!(
325 timestamp_s_to_date(timestamp).unwrap().date(),
326 expected_date
327 );
328 assert_eq!(
329 timestamp_s_to_time(timestamp).unwrap().time(),
330 expected_time
331 );
332 }
333
334 #[test]
335 fn negative_input_timestamp_ns_to_datetime() {

Callers

nothing calls this directly

Calls 3

timestamp_s_to_datetimeFunction · 0.85
dateMethod · 0.80
timeMethod · 0.45

Tested by

no test coverage detected