Skip to content

Commit

Permalink
Rename duplicated test name (#2740)
Browse files Browse the repository at this point in the history
  • Loading branch information
wojda authored Jun 8, 2022
1 parent d5edbe2 commit 097ceeb
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 })
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 097ceeb

Please sign in to comment.