Skip to content

Commit

Permalink
Add a punch test in the afternoon
Browse files Browse the repository at this point in the history
  • Loading branch information
lukipuki committed Mar 30, 2024
1 parent 9c8d40d commit fa4a543
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/punch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,10 @@ mod test_punch {
let time = DateTime::parse_from_rfc3339("2023-11-23T10:00:03.999+00:00").unwrap();
let bytes = SiPunch::time_to_bytes(time);
assert_eq!(bytes, [0x8, 0x8c, 0xa3, 0xff]);

let time = DateTime::parse_from_rfc3339("2023-11-26T22:00:03.000+00:00").unwrap();
let bytes = SiPunch::time_to_bytes(time);
assert_eq!(bytes, [0x1, 0x8c, 0xa3, 0x00]);
}

#[test]
Expand Down

0 comments on commit fa4a543

Please sign in to comment.