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