Skip to content

Commit

Permalink
types: duration: Add test for empty string and PT0S
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick José Pereira <[email protected]>
  • Loading branch information
patrickelectric committed Sep 14, 2024
1 parent be4da14 commit 0a4fcd4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions xsd-types/src/types/duration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,8 @@ mod tests {

#[test]
fn duration_parsing_test() {
assert_eq!(Duration::from_str(""), Duration::from_str("PT0S"));
check_valid("PT0S");
check_valid("P2Y6M5DT12H35M30S");
check_valid("P1DT2H");
check_valid("P20M");
Expand Down

0 comments on commit 0a4fcd4

Please sign in to comment.