From e152297090c26051b7e9a6a1740c4670d23d9d5d Mon Sep 17 00:00:00 2001 From: Rex Kerr Date: Fri, 31 Jan 2014 17:18:29 -0800 Subject: 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. --- test/files/scalacheck/range.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'test/files/scalacheck') 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 } -- cgit v1.2.3