diff options
author | Paul Phillips <paulp@improving.org> | 2010-02-04 12:26:42 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2010-02-04 12:26:42 +0000 |
commit | 9ee1f2f3b8ed91897bb298592f8a600ff5e4622d (patch) | |
tree | a2959e3eeaecb558d13a279404d35fb174df7ee7 /test/files/scalacheck/list.scala | |
parent | 93277ea0201f139e829cfd7248142a0c5898d9ce (diff) | |
download | scala-9ee1f2f3b8ed91897bb298592f8a600ff5e4622d.tar.gz scala-9ee1f2f3b8ed91897bb298592f8a600ff5e4622d.tar.bz2 scala-9ee1f2f3b8ed91897bb298592f8a600ff5e4622d.zip |
Unique's seeming victory is overruled by commit...
Unique's seeming victory is overruled by committee. It is "distinct",
not "unique", wherein lies the nub. No review.
Diffstat (limited to 'test/files/scalacheck/list.scala')
-rw-r--r-- | test/files/scalacheck/list.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/files/scalacheck/list.scala b/test/files/scalacheck/list.scala index f08b0d0394..1caf35e872 100644 --- a/test/files/scalacheck/list.scala +++ b/test/files/scalacheck/list.scala @@ -7,14 +7,14 @@ object Test extends Properties("List") { property("concat size") = forAll { (l1: List[Int], l2: List[Int]) => (l1.size + l2.size) == (l1 ::: l2).size } property("reverse") = forAll { (l1: List[Int]) => l1.reverse.reverse == l1 } - property("toSet") = forAll { (l1: List[Int]) => sorted(l1.toSet.toList) sameElements sorted(l1).unique } + property("toSet") = forAll { (l1: List[Int]) => sorted(l1.toSet.toList) sameElements sorted(l1).distinct } property("flatten") = forAll { (xxs: List[List[Int]]) => xxs.flatten.length == (xxs map (_.length) sum) } property("startsWith/take") = forAll { (xs: List[Int], count: Int) => xs startsWith (xs take count) } property("endsWith/takeRight") = forAll { (xs: List[Int], count: Int) => xs endsWith (xs takeRight count) } property("fill") = forAll(choose(1, 100)) { count => forAll { (x: Int) => val xs = List.fill(count)(x) - (xs.length == count) && (xs.unique == List(x)) + (xs.length == count) && (xs.distinct == List(x)) } } } |