diff options
author | Aleksandar Pokopec <aleksandar.prokopec@epfl.ch> | 2010-12-09 10:08:20 +0000 |
---|---|---|
committer | Aleksandar Pokopec <aleksandar.prokopec@epfl.ch> | 2010-12-09 10:08:20 +0000 |
commit | f2ecbd04691b1914e2f77c60afc2b296aa6826ae (patch) | |
tree | 539b543eb173cfc7b0bbde4ca5f2c5bb187297df /test/files/scalacheck/parallel-collections/ParallelIterableCheck.scala | |
parent | 492b22576f2ad46b300ce8dc31c5b672aaf517e4 (diff) | |
download | scala-f2ecbd04691b1914e2f77c60afc2b296aa6826ae.tar.gz scala-f2ecbd04691b1914e2f77c60afc2b296aa6826ae.tar.bz2 scala-f2ecbd04691b1914e2f77c60afc2b296aa6826ae.zip |
Array combiners implementation changed from arr...
Array combiners implementation changed from array buffers to doubling
unrolled buffers to avoid excessive copying. Still evaluating the
benefits of this.
No review.
Diffstat (limited to 'test/files/scalacheck/parallel-collections/ParallelIterableCheck.scala')
-rw-r--r-- | test/files/scalacheck/parallel-collections/ParallelIterableCheck.scala | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/files/scalacheck/parallel-collections/ParallelIterableCheck.scala b/test/files/scalacheck/parallel-collections/ParallelIterableCheck.scala index 8b5d72ea01..0dcd877ecb 100644 --- a/test/files/scalacheck/parallel-collections/ParallelIterableCheck.scala +++ b/test/files/scalacheck/parallel-collections/ParallelIterableCheck.scala @@ -398,6 +398,22 @@ abstract class ParallelIterableCheck[T](collName: String) extends Properties(col tarr.toSeq == collarr.toSeq } + if (hasStrictOrder) property("scans must be equal") = forAll(collectionPairs) { + case (t, coll) => + (for (((first, op), ind) <- foldArguments.zipWithIndex) yield { + val tscan = t.scanLeft(first)(op) + val cscan = coll.scan(first)(op) + if (tscan != cscan || cscan != tscan) { + println("from: " + t) + println("and: " + coll) + println("scans are: ") + println(tscan) + println(cscan) + } + ("operator " + ind) |: tscan == cscan && cscan == tscan + }).reduceLeft(_ && _) + } + } |