Skip to content

Commit b54c4ce

Browse files
committed
Rewritten a failing test in NonEmptyVectorSpec so that it passes in 2.13.0-RC1, by expecting the message to be consistent to Vector's error message.
1 parent d46ab90 commit b54c4ce

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

scalactic-test/src/test/scala/org/scalactic/anyvals/NonEmptyVectorSpec.scala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,12 @@ class NonEmptyVectorSpec extends UnitSpec {
135135
NonEmptyVector(1, 2, 3)(1) shouldEqual 2
136136
NonEmptyVector("hi")(0) shouldEqual "hi"
137137
NonEmptyVector(7, 8, 9)(2) shouldEqual 9
138+
val vectorOutOfBoundException = intercept[IndexOutOfBoundsException] {
139+
Vector(1, 2, 3)(3)
140+
}
138141
the [IndexOutOfBoundsException] thrownBy {
139142
NonEmptyVector(1, 2, 3)(3)
140-
} should have message "3"
143+
} should have message vectorOutOfBoundException.getMessage
141144
}
142145
it should "have a length method" in {
143146
NonEmptyVector(1).length shouldBe 1

0 commit comments

Comments
 (0)