Skip to content

Commit

Permalink
fix test_display
Browse files Browse the repository at this point in the history
  • Loading branch information
suharev7 committed Oct 27, 2023
1 parent 644001d commit 409a406
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions src/types/value_ref.rs
Original file line number Diff line number Diff line change
Expand Up @@ -575,16 +575,11 @@ mod test {
format!("{}", ValueRef::DateTime(0, *DEFAULT_TZ))
);

cfg_if::cfg_if! {
if #[cfg(any(target_os = "windows"))] {
let expected_alt_datetime = "Thu, 1 Jan 1970 00:00:00 +0000";
} else {
let expected_alt_datetime = "Thu, 01 Jan 1970 00:00:00 +0000";
}
}
assert_eq!(
expected_alt_datetime.to_string(),
format!("{:#}", ValueRef::DateTime(0, *DEFAULT_TZ))
assert!(
(format!("{:#}", ValueRef::DateTime(0, *DEFAULT_TZ))
== "Thu, 1 Jan 1970 00:00:00 +0000")
|| (format!("{:#}", ValueRef::DateTime(0, *DEFAULT_TZ))
== "Thu, 01 Jan 1970 00:00:00 +0000")
);

assert_eq!(
Expand Down

0 comments on commit 409a406

Please sign in to comment.