Skip to content

Commit

Permalink
tests: Correct tests after algorithm fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
tuxuser committed Nov 29, 2023
1 parent 6b332b1 commit ffc1d85
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,13 +186,13 @@ mod test {
#[test]
fn from_datetime() {
let dt = Utc.from_utc_datetime(
&DateTime::parse_from_rfc3339("2009-07-25T23:00:00.000001000Z")
&DateTime::parse_from_rfc3339("2009-07-25T23:00:00.0001Z")
.unwrap()
.naive_utc(),
);
assert_eq!(
FileTime::from_datetime(dt),
FileTime::from_i64(128930364000001000)
dt,
FileTime::from_i64(128930364000001000).into()
);
}

Expand All @@ -204,7 +204,7 @@ mod test {
ft,
FileTime {
secs: 13013971283,
nsecs: 1482830
nsecs: 148283000
}
);
}
Expand Down Expand Up @@ -243,7 +243,7 @@ mod test {
let dt = Utc
.with_ymd_and_hms(30828, 9, 14, 2, 48, 5)
.unwrap()
.checked_add_signed(Duration::nanoseconds(4775807))
.checked_add_signed(Duration::nanoseconds(477580700))
.unwrap();
assert_eq!(ft.to_datetime(), dt);
}
Expand All @@ -252,7 +252,7 @@ mod test {
fn filetime_one() {
let ft = FileTime::from_i64(1);
assert_eq!(ft.seconds(), 0);
assert_eq!(ft.nanoseconds(), 1);
assert_eq!(ft.nanoseconds(), 100);
}

#[test]
Expand Down

0 comments on commit ffc1d85

Please sign in to comment.