Skip to content

Commit

Permalink
Test new method
Browse files Browse the repository at this point in the history
  • Loading branch information
borntyping committed Mar 18, 2023
1 parent 7a4df08 commit 404005c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ impl SimpleLogger {

#[cfg(feature = "timestamps")]
timestamps: Timestamps::Utc,

#[cfg(feature = "timestamps")]
timeformat: None,

Expand Down Expand Up @@ -625,6 +625,15 @@ mod test {
assert!(builder.timestamps == Timestamps::Local);
}

#[test]
#[cfg(feature = "timestamps")]
#[allow(deprecated)]
fn test_with_timeformat() {
let builder =
SimpleLogger::new().with_custom_timestamps(time::macros::format_description!("[hour]:[minute]:[second]"));
assert!(builder.timeformat.is_some());
}

#[test]
#[cfg(feature = "colored")]
fn test_with_colors() {
Expand Down

0 comments on commit 404005c

Please sign in to comment.