fn string_conversion()

in azure-kusto-data/src/types.rs [153:173]


    fn string_conversion() {
        let refs: Vec<(&str, i64)> = vec![
            ("1.00:00:00.0000000", 86_400_000_000_000),
            ("01:00:00.0000000", 3_600_000_000_000),
            ("01:00:00", 3_600_000_000_000),
            ("00:05:00.0000000", 300_000_000_000),
            ("00:00:00.0000001", 100),
            ("-01:00:00", -3_600_000_000_000),
            ("-1.00:00:00.0000000", -86_400_000_000_000),
            ("00:00:00.1234567", 123_456_700),
        ];

        for (from, to) in refs {
            assert_eq!(
                KustoDuration::from_str(from)
                    .unwrap_or_else(|_| panic!("Failed to parse duration {}", from))
                    .whole_nanoseconds(),
                i128::from(to)
            );
        }
    }