From f990b7ce8cf8279dd62dee8cf296412582d552e4 Mon Sep 17 00:00:00 2001 From: Karlatemp Date: Fri, 18 Sep 2020 12:40:18 +0800 Subject: [PATCH] Remove redundant code --- .../net/mamoe/mirai/console/util/TestSemVersion.kt | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/backend/mirai-console/src/test/kotlin/net/mamoe/mirai/console/util/TestSemVersion.kt b/backend/mirai-console/src/test/kotlin/net/mamoe/mirai/console/util/TestSemVersion.kt index 28d7b234d..56d34ab71 100644 --- a/backend/mirai-console/src/test/kotlin/net/mamoe/mirai/console/util/TestSemVersion.kt +++ b/backend/mirai-console/src/test/kotlin/net/mamoe/mirai/console/util/TestSemVersion.kt @@ -96,16 +96,6 @@ internal class TestSemVersion { @Test internal fun testSemVersionParsing() { - fun String.check() { - val sem = SemVersion.parse(this) - assert(this == sem.toString()) { "$this != $sem" } - } - - fun String.checkInvalid() { - kotlin.runCatching { SemVersion.parse(this) } - .onSuccess { assert(false) { "$this not a invalid sem-version" } } - .onFailure { println("$this - $it") } - } "0.0".check() "1.0.0".check() "1.2.3.4.5.6.7.8".checkInvalid()