diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2013-11-20 17:31:24 -0800 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2013-11-20 17:31:24 -0800 |
commit | 9684f80bd3d52191f0dbea0afde2787bc7b6346d (patch) | |
tree | ecdc4e90f8867e65a2f1a7c5b190f802855e6a9c | |
parent | 394a3157fc35630fa468673f62bde2fb266198bd (diff) | |
parent | 733f7f086834b549e33a01b5d7504ac2d1353815 (diff) | |
download | scala-9684f80bd3d52191f0dbea0afde2787bc7b6346d.tar.gz scala-9684f80bd3d52191f0dbea0afde2787bc7b6346d.tar.bz2 scala-9684f80bd3d52191f0dbea0afde2787bc7b6346d.zip |
Merge pull request #3170 from adriaanm/scalacheck-1.11
Prepare upgrade to scalacheck 1.11.
-rw-r--r-- | test/files/scalacheck/CheckCollections.scala | 9 | ||||
-rw-r--r-- | test/files/scalacheck/CheckEither.scala | 12 | ||||
-rw-r--r-- | test/files/scalacheck/array-new.scala | 2 | ||||
-rw-r--r-- | test/files/scalacheck/quasiquotes/ArbitraryTreesAndNames.scala | 6 | ||||
-rw-r--r-- | test/files/scalacheck/si4147.scala | 4 | ||||
-rw-r--r-- | test/files/scalacheck/t2460.scala | 5 | ||||
-rw-r--r-- | test/files/scalacheck/treeset.scala | 2 |
7 files changed, 9 insertions, 31 deletions
diff --git a/test/files/scalacheck/CheckCollections.scala b/test/files/scalacheck/CheckCollections.scala index 108040b900..329d505b47 100644 --- a/test/files/scalacheck/CheckCollections.scala +++ b/test/files/scalacheck/CheckCollections.scala @@ -1,4 +1,4 @@ -import org.scalacheck.{ ConsoleReporter, Properties } +import org.scalacheck.Properties import org.scalacheck.Prop._ import scala.reflect.internal.util.Collections._ @@ -49,11 +49,4 @@ object Test extends Properties("reflect.internal.util.Collections") { for { (label, prop) <- tests } property(label) = prop - - import org.scalacheck.{ Test => STest } - - def runTests() = - STest.checkProperties( - STest.Params(testCallback = ConsoleReporter(0)), this) - } diff --git a/test/files/scalacheck/CheckEither.scala b/test/files/scalacheck/CheckEither.scala index 4d0cab4693..48f732a22d 100644 --- a/test/files/scalacheck/CheckEither.scala +++ b/test/files/scalacheck/CheckEither.scala @@ -1,10 +1,8 @@ -import org.scalacheck.{ Arbitrary, ConsoleReporter, Prop, Properties } +import org.scalacheck.{ Arbitrary, Prop, Properties } import org.scalacheck.Arbitrary.{arbitrary, arbThrowable} import org.scalacheck.Gen.oneOf -import org.scalacheck.util.StdRand import org.scalacheck.Prop._ -import org.scalacheck.Test.{Params, check} -import org.scalacheck.ConsoleReporter.testStatsEx +import org.scalacheck.Test.check import Function.tupled object Test extends Properties("Either") { @@ -178,10 +176,4 @@ object Test extends Properties("Either") { for ((label, prop) <- tests) { property(label) = prop } - - import org.scalacheck.{ Test => STest } - - def runTests() = { - STest.checkProperties(STest.Params(testCallback = ConsoleReporter(0)), this) - } } diff --git a/test/files/scalacheck/array-new.scala b/test/files/scalacheck/array-new.scala index e13a47a5d5..d8c69ead78 100644 --- a/test/files/scalacheck/array-new.scala +++ b/test/files/scalacheck/array-new.scala @@ -1,4 +1,4 @@ -import scala.reflect.{ClassTag, classTag} +import scala.reflect.ClassTag // new style: use ClassTag import org.scalacheck._ import Prop._ import Gen._ diff --git a/test/files/scalacheck/quasiquotes/ArbitraryTreesAndNames.scala b/test/files/scalacheck/quasiquotes/ArbitraryTreesAndNames.scala index c4b93dae48..7905a2ca15 100644 --- a/test/files/scalacheck/quasiquotes/ArbitraryTreesAndNames.scala +++ b/test/files/scalacheck/quasiquotes/ArbitraryTreesAndNames.scala @@ -222,7 +222,7 @@ trait ArbitraryTreesAndNames { yield ValDef(mods, name, tpt, rhs) def genTree(size: Int): Gen[Tree] = - if (size <= 1) oneOf(EmptyTree, genTreeIsTerm(size), genTreeIsType(size)) + if (size <= 1) oneOf(EmptyTree: Gen[Tree], genTreeIsTerm(size), genTreeIsType(size)) else oneOf(genTree(1), // these trees are neither terms nor types genPackageDef(size - 1), genModuleDef(size - 1), @@ -273,8 +273,8 @@ trait ArbitraryTreesAndNames { def apply(universe: Universe, value: TreeIsType): universe.Tree = value.tree.asInstanceOf[universe.Tree] } - implicit def treeIsTerm2tree(tit: TreeIsTerm) = tit.tree - implicit def treeIsType2tree(tit: TreeIsType) = tit.tree + implicit def treeIsTerm2tree(tit: TreeIsTerm): Tree = tit.tree + implicit def treeIsType2tree(tit: TreeIsType): Tree = tit.tree implicit val arbConstant: Arbitrary[Constant] = Arbitrary(genConstant) implicit val arbModifiers: Arbitrary[Modifiers] = Arbitrary(genModifiers) diff --git a/test/files/scalacheck/si4147.scala b/test/files/scalacheck/si4147.scala index 05507b1b18..72f6e9afd5 100644 --- a/test/files/scalacheck/si4147.scala +++ b/test/files/scalacheck/si4147.scala @@ -1,8 +1,6 @@ import org.scalacheck.Prop.{forAll, throws} import org.scalacheck.Properties -import org.scalacheck.ConsoleReporter.testStatsEx import org.scalacheck.Gen -import org.scalacheck.ConsoleReporter import collection.mutable @@ -66,5 +64,5 @@ object Test extends Properties("Mutable TreeSet") { } property("ordering must not be null") = - throws(mutable.TreeSet.empty[Int](null), classOf[NullPointerException]) + throws(classOf[NullPointerException])(mutable.TreeSet.empty[Int](null)) } diff --git a/test/files/scalacheck/t2460.scala b/test/files/scalacheck/t2460.scala index 196b43789f..ab2911447a 100644 --- a/test/files/scalacheck/t2460.scala +++ b/test/files/scalacheck/t2460.scala @@ -1,6 +1,5 @@ import org.scalacheck.Prop.forAll import org.scalacheck.Properties -import org.scalacheck.ConsoleReporter.testStatsEx import org.scalacheck.{Test => SCTest} import org.scalacheck.Gen @@ -25,8 +24,4 @@ object Test extends Properties("Regex : Ticket 2460") { ("numberOfGroup", numberOfGroup), ("nameOfGroup", nameOfGroup) ) - - /*tests foreach { - case (name, p) => testStatsEx(name, SCTest.check(p)) - }*/ } diff --git a/test/files/scalacheck/treeset.scala b/test/files/scalacheck/treeset.scala index 7fca3ed5e4..4b9b77dd7e 100644 --- a/test/files/scalacheck/treeset.scala +++ b/test/files/scalacheck/treeset.scala @@ -151,5 +151,5 @@ object Test extends Properties("TreeSet") { } property("ordering must not be null") = - throws(TreeSet.empty[Int](null), classOf[NullPointerException]) + throws(classOf[NullPointerException])(TreeSet.empty[Int](null)) } |