Change Duration.toString format KT-42851
This commit is contained in:
@@ -25,12 +25,12 @@ class Durations {
|
||||
|
||||
@Sample
|
||||
fun toStringDefault() {
|
||||
assertPrints(Duration.days(45), "45.0d")
|
||||
assertPrints(Duration.days(1.5), "36.0h")
|
||||
assertPrints(Duration.minutes(1230), "20.5h")
|
||||
assertPrints(Duration.minutes(920), "920m")
|
||||
assertPrints(Duration.seconds(1.546), "1.55s")
|
||||
assertPrints(Duration.milliseconds(25.12), "25.1ms")
|
||||
assertPrints(Duration.days(45), "1080h")
|
||||
assertPrints(Duration.days(1.5), "36h")
|
||||
assertPrints(Duration.minutes(1230), "20h 30m")
|
||||
assertPrints(Duration.minutes(920), "15h 20m")
|
||||
assertPrints(Duration.seconds(1.546), "1.546s")
|
||||
assertPrints(Duration.milliseconds(25.12), "0.025120s")
|
||||
}
|
||||
|
||||
@Sample
|
||||
|
||||
Reference in New Issue
Block a user