summaryrefslogblamecommitdiff
path: root/test/files/scalacheck/parallel-collections/ParallelSetCheck.scala
blob: 56f7832fed0e9b15602c1a3d3690ed075af106b9 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
















                                                                                                 
                            
 





                                                                          

   


































 
package scala.collection.parallel



import org.scalacheck._
import org.scalacheck.Gen
import org.scalacheck.Gen._
import org.scalacheck.Prop._
import org.scalacheck.Properties

import scala.collection._
import scala.collection.parallel._




abstract class ParallelSetCheck[T](collname: String) extends ParallelIterableCheck[T](collname) {
  type CollType <: ParSet[T]

  property("gets iterated keys") = forAll(collectionPairs) {
    case (t, coll) =>
    val containsT = for (elem <- t) yield (coll.contains(elem))
    val containsSelf = for (elem <- coll) yield (coll.contains(elem))
    ("Par contains elements of seq map" |: containsT.forall(_ == true)) &&
    ("Par contains elements of itself" |: containsSelf.forall(_ == true))
  }

}