formatting
This commit is contained in:
parent
3fc95f0927
commit
8161e59ba1
@ -1196,17 +1196,13 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn test_small_fraction_floored_to_zero() {
|
||||
let fractions =
|
||||
fractional_part_from_subsec_ns(FractionalResolution::SixtyNs, 59)
|
||||
.unwrap();
|
||||
let fractions = fractional_part_from_subsec_ns(FractionalResolution::SixtyNs, 59).unwrap();
|
||||
assert_eq!(fractions.1, 0);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_small_fraction_becomes_fractional_part() {
|
||||
let fractions =
|
||||
fractional_part_from_subsec_ns(FractionalResolution::SixtyNs, 61)
|
||||
.unwrap();
|
||||
let fractions = fractional_part_from_subsec_ns(FractionalResolution::SixtyNs, 61).unwrap();
|
||||
assert_eq!(fractions.1, 1);
|
||||
}
|
||||
|
||||
@ -1229,8 +1225,7 @@ mod tests {
|
||||
#[test]
|
||||
fn test_smallest_resolution_large_nanoseconds_becomes_largest_fraction() {
|
||||
let fractions =
|
||||
fractional_part_from_subsec_ns(FractionalResolution::FourMs, 10u64.pow(9) - 1)
|
||||
.unwrap();
|
||||
fractional_part_from_subsec_ns(FractionalResolution::FourMs, 10u64.pow(9) - 1).unwrap();
|
||||
assert_eq!(fractions.1, 2_u32.pow(8) - 1);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user