Skip to content

Commit d5ee20f

Browse files
committed
Fix property test of NodeSeq.\\
Exception thrown was made more consistent in 389cdce
1 parent 20a50a9 commit d5ee20f

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

Diff for: jvm/src/test/scala/scala/xml/NodeSeqSpec.scala

+2-8
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,7 @@ object NodeSeqSpec extends PropertiesFor("NodeSeq")
8989

9090
property("\\\\ \"\".throws[Exception]") = {
9191
Prop.forAll { n: NodeSeq =>
92-
// FIXME: Should be IllegalArgumentException.
93-
Prop.throws(classOf[StringIndexOutOfBoundsException]) {
92+
Prop.throws(classOf[IllegalArgumentException]) {
9493
(n \\ "")
9594
}
9695
}
@@ -113,12 +112,7 @@ object NodeSeqSpec extends PropertiesFor("NodeSeq")
113112
property("\\\\") = {
114113
Prop.forAll { (n: NodeSeq, s: String) =>
115114
Prop.iff[String](s, {
116-
// FIXME: Should be IllegalArgumentException, regardless of theSeq.
117-
case "" =>
118-
Prop.throws(classOf[StringIndexOutOfBoundsException]) {
119-
(n \\ s)
120-
}
121-
case "@" =>
115+
case "" | "@" =>
122116
Prop.throws(classOf[IllegalArgumentException]) {
123117
(n \\ s)
124118
}

0 commit comments

Comments
 (0)