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

Function test_split_seconds

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

Source from the content-addressed store, hash-verified

385
386 #[test]
387 fn test_split_seconds() {
388 let (sec, nano_sec) = split_second(100, NANOSECONDS);
389 assert_eq!(sec, 0);
390 assert_eq!(nano_sec, 100);
391
392 let (sec, nano_sec) = split_second(123_000_000_456, NANOSECONDS);
393 assert_eq!(sec, 123);
394 assert_eq!(nano_sec, 456);
395
396 let (sec, nano_sec) = split_second(-1, NANOSECONDS);
397 assert_eq!(sec, -1);
398 assert_eq!(nano_sec, 999_999_999);
399
400 let (sec, nano_sec) = split_second(-123_000_000_001, NANOSECONDS);
401 assert_eq!(sec, -124);
402 assert_eq!(nano_sec, 999_999_999);
403 }
404}

Callers

nothing calls this directly

Calls 1

split_secondFunction · 0.85

Tested by

no test coverage detected