Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuxiujia committed Dec 18, 2023
1 parent fbfb13f commit fed3e07
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/datetime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -863,14 +863,16 @@ fn test_format() {
year: 2000,
},
Time {
nano: 1233,
nano: 123456000,
sec: 11,
minute: 1,
hour: 1,
},
));
let f = dt.format("YYYY-MM-DD/hh/mm/ss");
assert_eq!(f, "2000-1-1/1/1/11");
let f = dt.format("YYYY-MM-DD/hh/mm/ss.000000");
assert_eq!(f, "2000-1-1/1/1/11.123456");
let f = dt.format("YYYY-MM-DD/hh/mm/ss.000000000");
assert_eq!(f, "2000-1-1/1/1/11.123456000");
}

#[test]
Expand Down

0 comments on commit fed3e07

Please sign in to comment.