We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d46ab90 commit b54c4ceCopy full SHA for b54c4ce
scalactic-test/src/test/scala/org/scalactic/anyvals/NonEmptyVectorSpec.scala
@@ -135,9 +135,12 @@ class NonEmptyVectorSpec extends UnitSpec {
135
NonEmptyVector(1, 2, 3)(1) shouldEqual 2
136
NonEmptyVector("hi")(0) shouldEqual "hi"
137
NonEmptyVector(7, 8, 9)(2) shouldEqual 9
138
+ val vectorOutOfBoundException = intercept[IndexOutOfBoundsException] {
139
+ Vector(1, 2, 3)(3)
140
+ }
141
the [IndexOutOfBoundsException] thrownBy {
142
NonEmptyVector(1, 2, 3)(3)
- } should have message "3"
143
+ } should have message vectorOutOfBoundException.getMessage
144
}
145
it should "have a length method" in {
146
NonEmptyVector(1).length shouldBe 1
0 commit comments