You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: core-kotlin-modules/core-kotlin-exceptions/src/test/kotlin/com/baeldung/conditionalThrowing/ConditionalThrowingUnitTest.kt
-2Lines changed: 0 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,6 @@ class ConditionalThrowingUnitTest {
29
29
val str ="a b c"
30
30
assertThrows<IllegalArgumentException> {
31
31
require(str.length >10) { "The string is too short." }
32
-
null.toString()
33
32
}
34
33
35
34
val upperStr = str.also {
@@ -74,7 +73,6 @@ class ConditionalThrowingUnitTest {
74
73
}
75
74
76
75
val nullIsValid:String?=null
77
-
// we don't expect the exception
78
76
assertThrows<MyException> {
79
77
nullIsValid.takeIf { true } ?:throwMyException("The string is too short.")
0 commit comments