diff options
author | Som Snytt <som.snytt@gmail.com> | 2013-04-24 15:50:45 -0700 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2013-04-30 08:18:22 -0700 |
commit | bf4466982854ffa8be57068752ea31daf7776eee (patch) | |
tree | 46cd3a6276d8fa3df9ccb7d730c29b1cf825edc2 /test/files/scalacheck | |
parent | b47ca5b17ec8079a23d48103c6af295c2f01caf3 (diff) | |
download | scala-bf4466982854ffa8be57068752ea31daf7776eee.tar.gz scala-bf4466982854ffa8be57068752ea31daf7776eee.tar.bz2 scala-bf4466982854ffa8be57068752ea31daf7776eee.zip |
SI-7349 Partest supports test-interface
Partest uses test-interface API to invoke ScalaCheck. This obviates
ad hoc output checking for result status.
The context class loader is set to a loader that the scaladoc scalacheck
tests can use.
Diffstat (limited to 'test/files/scalacheck')
-rw-r--r-- | test/files/scalacheck/HashTrieSplit.scala | 47 | ||||
-rw-r--r-- | test/files/scalacheck/parallel-collections/pc.scala | 14 |
2 files changed, 7 insertions, 54 deletions
diff --git a/test/files/scalacheck/HashTrieSplit.scala b/test/files/scalacheck/HashTrieSplit.scala deleted file mode 100644 index 908c878f54..0000000000 --- a/test/files/scalacheck/HashTrieSplit.scala +++ /dev/null @@ -1,47 +0,0 @@ - - - - - -import collection._ - - - - -// checks whether hash tries split their iterators correctly -// even after some elements have been traversed -object Test { - def main(args: Array[String]) { - doesSplitOk - } - - def doesSplitOk = { - val sz = 2000 - var ht = new parallel.immutable.ParHashMap[Int, Int] - // println("creating trie") - for (i <- 0 until sz) ht += ((i + sz, i)) - // println("created trie") - for (n <- 0 until (sz - 1)) { - // println("---------> n = " + n) - val pit = ht.splitter - val pit2 = ht.splitter - var i = 0 - while (i < n) { - pit.next - pit2.next - i += 1 - } - // println("splitting") - val pits = pit.split - val fst = pits(0).toSet - val snd = pits(1).toSet - val orig = pit2.toSet - if (orig.size != (fst.size + snd.size) || orig != (fst ++ snd)) { - println("Original: " + orig) - println("First: " + fst) - println("Second: " + snd) - assert(false) - } - } - } -} diff --git a/test/files/scalacheck/parallel-collections/pc.scala b/test/files/scalacheck/parallel-collections/pc.scala index 0a91977da0..e6b6b4856d 100644 --- a/test/files/scalacheck/parallel-collections/pc.scala +++ b/test/files/scalacheck/parallel-collections/pc.scala @@ -1,12 +1,11 @@ - - - +/* + * scalac: -deprecation + * scalacheck: -workers 1 -minSize 0 -maxSize 4000 -minSuccessfulTests 5 + */ import org.scalacheck._ - import scala.collection.parallel._ - class ParCollProperties extends Properties("Parallel collections") { /* Collections */ @@ -35,8 +34,8 @@ class ParCollProperties extends Properties("Parallel collections") { include(immutable.IntParallelVectorCheck) } - -object Test { +object Test extends ParCollProperties { + /* def main(args: Array[String]) { val pc = new ParCollProperties org.scalacheck.Test.checkProperties( @@ -51,4 +50,5 @@ object Test { pc ) } + */ } |