blob: c22dddf96d808d40608d6154506adab57fde8ca3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
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") = forAllNoShrink(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))
}
}
|