summaryrefslogtreecommitdiff
path: root/test/files/scalacheck/range.scala
Commit message (Collapse)AuthorAgeFilesLines
* Reasonable Range operations consistently work when overfull.Rex Kerr2014-02-091-1/+2
| | | | | | 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.
* SI-7443 Use typeclass instance for {Range,NumericRange}.sumDmitry Petrashko2013-12-291-0/+41
| | | | | | | | Previously both Range and NumeriRange used formula for sum of elements of arithmetic series and thus always assumed that provided Numeric is regular one. Bug is now fixed by conservatively checking if Numeric is one of default ones and the formula still holds.
* Cull extraneous whitespace.Paul Phillips2013-09-181-2/+2
| | | | | | | | | | | | | | | | | | | | | One last flurry with the broom before I leave you slobs to code in your own filth. Eliminated all the trailing whitespace I could manage, with special prejudice reserved for the test cases which depended on the preservation of trailing whitespace. Was reminded I cannot figure out how to eliminate the trailing space on the "scala> " prompt in repl transcripts. At least reduced the number of such empty prompts by trimming transcript code on the way in. Routed ConsoleReporter's "printMessage" through a trailing whitespace stripping method which might help futureproof against the future of whitespace diseases. Deleted the up-to-40 lines of trailing whitespace found in various library files. It seems like only yesterday we performed whitespace surgery on the whole repo. Clearly it doesn't stick very well. I suggest it would work better to enforce a few requirements on the way in.
* Improve quality of scalacheck range tests input and output.Daniel C. Sobral2011-12-161-26/+55
| | | | | | | Remove some dead code, activate ByOne generator again, add generators for inclusive ranges, add generators that concentrate on the boundaries, and add some print statements next to exceptions that might get eaten by out of memory errors.
* Fix for unfortunate bug in Range.init.Paul Phillips2011-06-301-0/+7
|
* Took a step back and massively simplified Range.Paul Phillips2010-11-011-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | all the boundary conditions I'm aware of, including not yet reported ones such as scala> 5 until 5 last res0: Int = 4 and scala> 1073741823 to Int.MaxValue by (1 << 24) size res0: Int = 65 scala> 1073741823 to Int.MaxValue by (1 << 24) drop 100 size res1: Int = 256 Also includes conformance improvements (e.g. 5 until 5 init should throw an exception, not return empty) and general improvements (e.g. 1 to 10 tail should return a Range.) Will close associated tickets such as #3232 after I complete similar work on NumericRange. Review by community.
* Cleaning up the contents of test.Paul Phillips2010-09-281-0/+206
| | | | | | | | | | | including "CheckEither", written against scalacheck 1.2 in the year 471 AD. Removed all the duplicates I could find, mostly between pending and files. Renamed a bunch of tests so they wouldn't look like likely duplicates next time around. Nominated somebody else to do this once in a while. No review.
* Disabled scalacheck tests because they interfer...Martin Odersky2010-05-101-205/+0
| | | | | | Disabled scalacheck tests because they interfere with library refactorings (refactorings break scalacheck).
* Forgot to add scalacheck test for #2535.Aleksandar Pokopec2010-04-061-0/+205