Matching XML Group

3 views
Skip to first unread message

efleming969

unread,
May 22, 2009, 12:06:56 PM5/22/09
to specs-users
Don't know if this is a bug, a problem with using Scala's XML Group
(admittedly a hack), or something I don't understand.

scala> val expected = <container><foo /><bar /></
container>
expected: scala.xml.Elem = <container><foo></foo><bar></bar></
container>

scala> val actual = <container>{ Group(<foo /><bar />) }</
container>
actual: scala.xml.Elem = <container><foo></foo><bar></bar></container>

scala> xml.NodeFunctions.isEqualIgnoringSpace(expected,
actual)
java.lang.UnsupportedOperationException: class Group does not support
method 'label'
at scala.xml.Group.label(Group.scala:37)
at scala.xml.Group.label(Group.scala:20)
at org.specs.xml.NodeFunctions$.isSpaceNode(ExtendedNode.scala:
40)
at org.specs.xml.NodeFunctions$$anonfun$isEqualIgnoringSpace
$3.apply(ExtendedNode.scala:73)
at org.specs.xml.NodeFunctions$$anonfun$isEqualIgnoringS...

etorreborre

unread,
May 22, 2009, 8:17:12 PM5/22/09
to specs-users
It looks like a bug to me.

Can you please create an issue on the Google code project?

Thanks,

Eric.
Reply all
Reply to author
Forward
0 new messages