Hi Asko,
Yes, we didn't want to hold up the 2.0 release to add that, but have
since added it. I believe we added it to master, though, not the 2.2.x
branch. Regardless, the syntax looks like:
scala> val xSet = Set(1, 2, 3, 4, 5)
xSet: scala.collection.immutable.Set[Int] = Set(5, 1, 2, 3, 4)
scala> val ySet = Set(3, 4)
ySet: scala.collection.immutable.Set[Int] = Set(3, 4)
scala> xSet should contain allElementsOf (ySet)
scala> ySet should contain allElementsOf (xSet)
org.scalatest.exceptions.TestFailedException: Set(3, 4) did not
contain all elements of List(5, 1, 2, 3, 4)
at org.scalatest.MatchersHelper$.newTestFailedException(MatchersHelper.scala:160)
at org.scalatest.words.ResultOfContainWord.allElementsOf(ResultOfContainWord.scala:296)
... 43 elided
Looks like we magically converted the set to a List somewhere, but you
get the idea. Essentially we added an *ElementsOf variant for all the
contain syntax, allOf => allElementsOf, oneOf => oneElementOf, etc.
Will be in 3.0.
Bill
> --
> You received this message because you are subscribed to the Google
> Groups "scalatest-users" group.
> To post to this group, send email to
scalate...@googlegroups.com
> To unsubscribe from this group, send email to
>
scalatest-use...@googlegroups.com
> For more options, visit this group at
>
http://groups.google.com/group/scalatest-users?hl=en
> ScalaTest itself, and documentation, is available here:
>
http://www.artima.com/scalatest
> ---
> You received this message because you are subscribed to the Google Groups
> "scalatest-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
scalatest-use...@googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.
--
Bill Venners
Artima, Inc.
http://www.artima.com