From 13be1d7d0bdee4089e327ca9bed5f612511a92da Mon Sep 17 00:00:00 2001 From: jesperancinha Date: Thu, 28 Dec 2023 21:48:34 +0100 Subject: [PATCH] Improvements --- kotlin-string-operations/src/test/kotlin/Others.kt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/kotlin-string-operations/src/test/kotlin/Others.kt b/kotlin-string-operations/src/test/kotlin/Others.kt index 3f7b3b6db..b63439073 100644 --- a/kotlin-string-operations/src/test/kotlin/Others.kt +++ b/kotlin-string-operations/src/test/kotlin/Others.kt @@ -13,14 +13,12 @@ class Others { } .joinToString("") - val result2 = testString .reduce { acc, c -> c .takeIf { c > acc } ?: acc } - - result shouldBe "Thhttttttttttttttttttttttttttt" + result shouldBe "Thh".plus("t".repeat(27)) result.length shouldBe testString.length result2 shouldBe 't' }