diff options
author | Seth Tisue <seth@tisue.net> | 2017-01-23 14:35:47 -0800 |
---|---|---|
committer | Seth Tisue <seth@tisue.net> | 2017-01-27 09:29:53 -0800 |
commit | 4386b948a0b597cc78e4f3b22b51e0588a5b6d60 (patch) | |
tree | eca8cea41d110d8b14d27a83ae06a90e966f9621 /test/files/scalacheck/t4147.scala | |
parent | 27c10db549e6f43571663d0162b58fc04fbb34bf (diff) | |
download | scala-4386b948a0b597cc78e4f3b22b51e0588a5b6d60.tar.gz scala-4386b948a0b597cc78e4f3b22b51e0588a5b6d60.tar.bz2 scala-4386b948a0b597cc78e4f3b22b51e0588a5b6d60.zip |
run ScalaCheck tests directly, not through partest
ScalaCheck ever being under partest in the first place is ancient
history, from back in the Ant build days (shudder)
ScalaCheck support was removed from partest 1.1.0, which we already
upgraded to in a recent commit
also upgrades ScalaCheck from 1.11.6 to 1.13.4, since we might
as well. no source changes were necessary.
Diffstat (limited to 'test/files/scalacheck/t4147.scala')
-rw-r--r-- | test/files/scalacheck/t4147.scala | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/test/files/scalacheck/t4147.scala b/test/files/scalacheck/t4147.scala deleted file mode 100644 index 72f6e9afd5..0000000000 --- a/test/files/scalacheck/t4147.scala +++ /dev/null @@ -1,68 +0,0 @@ -import org.scalacheck.Prop.{forAll, throws} -import org.scalacheck.Properties -import org.scalacheck.Gen - - -import collection.mutable - - -object Test extends Properties("Mutable TreeSet") { - - val generator = Gen.listOfN(1000, Gen.chooseNum(0, 1000)) - - val denseGenerator = Gen.listOfN(1000, Gen.chooseNum(0, 200)) - - property("Insertion doesn't allow duplicates values.") = forAll(generator) { (s: List[Int]) => - { - val t = mutable.TreeSet[Int](s: _*) - t == s.toSet - } - } - - property("Verification of size method validity") = forAll(generator) { (s: List[Int]) => - { - val t = mutable.TreeSet[Int](s: _*) - for (a <- s) { - t -= a - } - t.size == 0 - } - } - - property("All inserted elements are removed") = forAll(generator) { (s: List[Int]) => - { - val t = mutable.TreeSet[Int](s: _*) - for (a <- s) { - t -= a - } - t == Set() - } - } - - property("Elements are sorted.") = forAll(generator) { (s: List[Int]) => - { - val t = mutable.TreeSet[Int](s: _*) - t.toList == s.distinct.sorted - } - } - - property("Implicit CanBuildFrom resolution succeeds as well as the \"same-result-type\" principle.") = - forAll(generator) { (s: List[Int]) => - { - val t = mutable.TreeSet[Int](s: _*) - val t2 = t.map(_ * 2) - t2.isInstanceOf[collection.mutable.TreeSet[Int]] - } - } - - property("A view doesn't expose off bounds elements") = forAll(denseGenerator) { (s: List[Int]) => - { - val t = mutable.TreeSet[Int](s: _*) - val view = t.rangeImpl(Some(50), Some(150)) - view.filter(_ < 50) == Set[Int]() && view.filter(_ >= 150) == Set[Int]() - } - } - - property("ordering must not be null") = - throws(classOf[NullPointerException])(mutable.TreeSet.empty[Int](null)) -} |