From 20a46b132e781d8c3357368de335d5732ce78c06 Mon Sep 17 00:00:00 2001 From: PoiScript Date: Fri, 17 Nov 2023 16:42:04 +0800 Subject: [PATCH] test: update test in Timestamp::start_to_chorno --- src/ast/timestamp.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ast/timestamp.rs b/src/ast/timestamp.rs index 68d926a..d2c404f 100644 --- a/src/ast/timestamp.rs +++ b/src/ast/timestamp.rs @@ -68,6 +68,9 @@ impl Timestamp { /// /// let ts = Org::parse("[2003-09-16 Tue 09:39-10:39]").first_node::().unwrap(); /// assert_eq!(ts.start_to_chrono().unwrap(), "2003-09-16T09:39:00".parse::().unwrap()); + /// + /// let ts = Org::parse("[2003-13-00 Tue 09:39-10:39]").first_node::().unwrap(); + /// assert!(ts.start_to_chrono().is_none()); /// ``` #[cfg(feature = "chrono")] pub fn start_to_chrono(&self) -> Option {