зеркало из
https://github.com/iharh/notes.git
synced 2025-11-01 22:26:09 +02:00
10 строки
395 B
Plaintext
10 строки
395 B
Plaintext
an [IndexOutOfBoundsException] should be thrownBy s.charAt(-1)
|
|
|
|
val thrown = the [IndexOutOfBoundsException] should be thrownBy s.charAt(-1)
|
|
thrown.getMessage should equal ("String index out of range: -1")
|
|
|
|
the [ArithmeticException] thrown by 1 / 0 should have message "/by zero"
|
|
the [IndexOutOfBoundsException] thrownBy {
|
|
s.charAt(-1)
|
|
} should have message "String index out of range: -1"
|