From c8cc4acb6d7302265efdf12d643ec33710c0bc92 Mon Sep 17 00:00:00 2001 From: wojda Date: Sun, 5 Jun 2022 22:56:03 +0100 Subject: [PATCH] Rename duplicated test name This tiny change will remove warning printed by `./gradlew test`: ``` WARN: Duplicated test name short circuit null. To disable this message, set DuplicateTestNameMode to None. WARN: Duplicated test name short circuit null. To disable this message, set DuplicateTestNameMode to None. ``` --- .../arrow/core/continuations/NullableSpec.kt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/arrow-libs/core/arrow-core/src/commonTest/kotlin/arrow/core/continuations/NullableSpec.kt b/arrow-libs/core/arrow-core/src/commonTest/kotlin/arrow/core/continuations/NullableSpec.kt index 63360c2a31a..d5036e9659b 100644 --- a/arrow-libs/core/arrow-core/src/commonTest/kotlin/arrow/core/continuations/NullableSpec.kt +++ b/arrow-libs/core/arrow-core/src/commonTest/kotlin/arrow/core/continuations/NullableSpec.kt @@ -32,6 +32,14 @@ class NullableSpec : StringSpec({ } "short circuit null" { + nullable { + val number: Int = "s".length + (number.takeIf { it > 1 }?.toString()).bind() + throw IllegalStateException("This should not be executed") + } shouldBe null + } + + "ensureNotNull short circuit" { nullable { val number: Int = "s".length val x = ensureNotNull(number.takeIf { it > 1 }) @@ -62,14 +70,6 @@ class NullableSpec : StringSpec({ } shouldBe "1" } - "short circuit null" { - nullable { - val number: Int = "s".length - (number.takeIf { it > 1 }?.toString()).bind() - throw IllegalStateException("This should not be executed") - } shouldBe null - } - "short circuit option" { nullable { val number = Some("s".length)