Skip to content

Commit b06a935

Browse files
committed
Fix property test of NodeSeq.\@
Exception thrown was made more consistent in 9a0db27
1 parent 223271b commit b06a935

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

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

+2-14
Original file line numberDiff line numberDiff line change
@@ -54,16 +54,10 @@ object NodeSeqSpec extends PropertiesFor("NodeSeq")
5454
property("\\ @.throws[Exception]") = {
5555
Prop.forAll { n: NodeSeq =>
5656
Prop.iff[NodeSeq](n, {
57-
// FIXME: Should be IllegalArgumentException, regardless of theSeq.
58-
case n if n.length == 0 =>
59-
(n \ "@") ?= NodeSeq.Empty
60-
case n if n.length == 1 =>
57+
case n: NodeSeq =>
6158
Prop.throws(classOf[IllegalArgumentException]) {
6259
(n \ "@")
6360
}
64-
case n: NodeSeq =>
65-
(n \ "@")
66-
Prop.passed
6761
})
6862
}
6963
}
@@ -126,16 +120,10 @@ object NodeSeqSpec extends PropertiesFor("NodeSeq")
126120
property("\\@ \"\".throws[Exception]") = {
127121
Prop.forAll { n: NodeSeq =>
128122
Prop.iff[NodeSeq](n, {
129-
// FIXME: Should be IllegalArgumentException, regardless of theSeq.
130-
case n if n.length == 0 =>
131-
(n \@ "") ?= ""
132-
case n if n.length == 1 =>
123+
case s =>
133124
Prop.throws(classOf[IllegalArgumentException]) {
134125
(n \@ "")
135126
}
136-
case s =>
137-
(n \@ "")
138-
Prop.passed
139127
})
140128
}
141129
}

0 commit comments

Comments
 (0)