summaryrefslogtreecommitdiff
path: root/test/files/scalacheck
diff options
context:
space:
mode:
authorRex Kerr <ichoran@gmail.com>2014-01-31 17:18:29 -0800
committerRex Kerr <ichoran@gmail.com>2014-02-09 12:41:33 -0800
commite152297090c26051b7e9a6a1740c4670d23d9d5d (patch)
tree805e754ab40aaf56ccdc6581d8d6ed1e1e6d6fe3 /test/files/scalacheck
parent95f21ca8a095767202e1c4d620a865c1647d7e6c (diff)
downloadscala-e152297090c26051b7e9a6a1740c4670d23d9d5d.tar.gz
scala-e152297090c26051b7e9a6a1740c4670d23d9d5d.tar.bz2
scala-e152297090c26051b7e9a6a1740c4670d23d9d5d.zip
Reasonable Range operations consistently work when overfull.
Operations are reasonable when they don't require indexing or conversion into a collection. These include head, tail, init, last, drop, take, dropWhile, takeWhile, dropRight, takeRight, span. Tests added also to verify the new behavior.
Diffstat (limited to 'test/files/scalacheck')
-rw-r--r--test/files/scalacheck/range.scala3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/files/scalacheck/range.scala b/test/files/scalacheck/range.scala
index 1eb186f303..493083a51f 100644
--- a/test/files/scalacheck/range.scala
+++ b/test/files/scalacheck/range.scala
@@ -265,7 +265,8 @@ object TooLargeRange extends Properties("Too Large Range") {
property("Too large range throws exception") = forAll(genTooLargeStart) { start =>
try {
val r = Range.inclusive(start, Int.MaxValue, 1)
- println("how here? r = " + r.toString)
+ val l = r.length
+ println("how here? length = " + l + ", r = " + r.toString)
false
}
catch { case _: IllegalArgumentException => true }