fix: round final compact progress fraction to completion
This commit is contained in:
@@ -34,6 +34,7 @@ struct SystemPlaybackChecks {
|
||||
"compact time uses total-duration units, truncation and bounded progress: \(expected)")
|
||||
}
|
||||
for (position, expected) in [(59.9, "59.9"), (59.99, "59.9"), (0.0, "0.0"),
|
||||
(99.89, "99.8"), (99.9, "100.0"), (99.99, "100.0"),
|
||||
(100.0, "100.0"), (105.0, "100.0"), (-1.0, "0.0")] {
|
||||
require(compactProgressText(position: position, duration: 100, format: .percentage) == expected,
|
||||
"compact percentage has one decimal and stays bounded: \(expected)")
|
||||
|
||||
Reference in New Issue
Block a user