summaryrefslogtreecommitdiff
path: root/test/files/scalacheck
Commit message (Collapse)AuthorAgeFilesLines
...
* | Cull extraneous whitespace.Paul Phillips2013-09-1827-254/+254
|/ | | | | | | | | | | | | | | | | | | | | 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.
* SI-7304 improve deprecation warnings for tree factory methodsDen Shabalin2013-09-112-1/+54
|
* streamline implementation of annotation splicingDen Shabalin2013-09-051-0/+10
| | | | | | Syntax spec mislead me to believe that annotation can't have type parameters or multiple argument lists... I guess the lesson here is don't trust the spec.
* unify handling of references to scala members for functions and tuplesDen Shabalin2013-09-051-1/+1
|
* better support for ValDefs, VarDefs and DefDefsDen Shabalin2013-09-051-0/+9
|
* SI-7723 better support for deconstruction of new expressionsDen Shabalin2013-09-051-0/+17
|
* SI-7803 support for matching of anonymous function literalsDen Shabalin2013-09-052-1/+18
|
* first-class early def splicing and extraction supportDen Shabalin2013-09-052-2/+107
|
* add support for function type splicing and extractionDen Shabalin2013-09-052-0/+12
|
* reify ScalaPackage symbol with the help of ScalaDotDen Shabalin2013-09-051-1/+2
|
* refine block and applied/typeapplied splicing/matching semanticsDen Shabalin2013-09-054-5/+12
| | | | | | | | | | | | | | | | | | | 1. blocks now match single term-level expressions to account for automatic block elimination. E.g. val q"{ ..$stats }" = q"foo" will match into stats = List(q"foo"). This is useful to uniformly deal with blocks on term level. 2. blocks in quasiquotes collapse into single expressions 3. Applied and TypeApplied now have constructors too which helps to unify matching and extraction in quasiquote reifier 4. TypeApplied now matches AppliedTypeTree too 5. Add Syntactic prefix to Applied and TypeApplied
* SI-7196 add support for refineStat splicing and extractionDen Shabalin2013-09-052-0/+10
|
* refactor definition tests into separate subsuiteDen Shabalin2013-09-055-249/+326
|
* add toolbox-based utility methods to quasiquotes' testsDen Shabalin2013-09-051-6/+15
|
* SI-6843 well-positioned syntax errors for quasiquotesDen Shabalin2013-08-141-6/+0
| | | | | | | | | | | | | This is achieved in a following way: 1. Similarly to toolbox quasiquotes can go away with wrapping for parsing purpose after introduction of `parseStats` and `parseRule` entry points. 2. In case of syntax error quasiquote computes equivalent corresponding position in the source code with the help of `corrrespondingPosition` mapper which relies on position data collected into `posMap` during code generation.
* Merge pull request #2764 from folone/masterGrzegorz Kossakowski2013-08-121-0/+59
|\ | | | | Making map2Conserve occupy constant stack space in spirit of SI-2411.
| * Make map2Conserve occupy constant stack space in spirit of SI-2411George Leontiev2013-08-081-0/+59
| | | | | | | | | | | | | | | | | | | | | | I recently discovered a StackOverflowError, caused by this function: https://gist.github.com/folone/7b2f2e2a16314ab28109 The circumstances are pretty extreme, still having a tail-recursive function seems to be a good idea. The function behaves the same way old function did (supported by tests), which is not really how map2 behaves. I did not change this behavior to not introduce any regression. I actually tried to make it behave like map2, and it does introduce regression.
* | DefDef.name is now TermName againEugene Burmako2013-08-101-1/+1
|/ | | | | Now when there's no hope left for type macros, it's reasonable to provide a more specific type for DefDef.name.
* tests for quasiquotesDen Shabalin2013-07-0811-0/+1280
| | | | | | Introduces an extensive ScalaCheck-based test suite for recently implemented quasiquotes. Provides tools for syntactic tree comparison and verifying compilation error messages.
* SI-7590 TreeSet should fail fast if Ordering is nullSimon Ochsenreither2013-06-252-1/+7
| | | | | | | | | | While migrating scala.tools.nsc.util.TreeSet to scala.collection.mutable.TreeSet, I messed up initialization order and realized that TreeSet accepts null as an Ordering and only fails much later. This change makes mutable.TreeSet and immutable.TreeSet fail immediately.
* SI-7469 Remove @deprecated scala.util.loggingSimon Ochsenreither2013-05-161-3/+1
|
* SI-7349 Partest supports test-interfaceSom Snytt2013-04-302-54/+7
| | | | | | | | Partest uses test-interface API to invoke ScalaCheck. This obviates ad hoc output checking for result status. The context class loader is set to a loader that the scaladoc scalacheck tests can use.
* Maintenance of Predef.Paul Phillips2013-02-121-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1) Deprecates much of Predef and scala.Console, especially: - the read* methods (see below) - the set{Out,Err,In} methods (see SI-4793) 2) Removed long-deprecated: - Predef#exit - Predef#error should have gone, but could not due to sbt At least the whole source base has now been future-proofed against the eventual removal of Predef#error. The low justification for the read* methods should be readily apparent: they are little used and have no call to be in global namespace, especially given their weird ad hoc semantics and unreasonably tempting names such as readBoolean(). 3) Segregated the deprecated elements in Predef from the part which still thrives. 4) Converted all the standard Predef implicits into implicit classes, value classes where possible: - ArrowAssoc, Ensuring, StringFormat, StringAdd, RichException (value) - SeqCharSequence, ArrayCharSequence (non-value) Non-implicit deprecated stubs prop up the names of the formerly converting methods.
* Merge commit '644eb7078a' into wip/fresh-merge2Paul Phillips2013-02-011-1/+1
|\ | | | | | | | | | | Conflicts: build.xml src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala
| * SI-6968 Simple Tuple patterns aren't irrefutableJason Zaugg2013-01-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Reverts part of c82ecab. The parser can't assume that a pattern `(a, b)` will match, as results of `.isInstanceOf[Tuple2]` can't be statically known until after the typer. The reopens SI-1336, SI-5589 and SI-4574, in exchange for fixing this regression SI-6968. Keeping all of those fixed will require a better definition of irrefutability, and some acrobatics to ensure safe passage to the ambiguous trees through typechecking.
* | SI-6811 Remove deprecated elements in scala.collectionSimon Ochsenreither2013-01-171-213/+0
| |
* | Adds extractors for TypeName, TermName and ModifiersDen Shabalin2012-12-251-0/+52
|/ | | | | | | | | | | This change allows to pattern match over type names, term names and modifiers. Otherwise it can be quite painful to match over complex trees as each name or modifiers requires a guard. This pull request also changes the name of default constructor for term and type names i.e. TypeName(s) instead of newTermName(s). This is shorter to type, more consistent with the rest of reflection api and consistent with the way it will be pattern matched later on.
* Merge pull request #1339 from rkuhn/wip-6389-finite-duration-multJosh Suereth2012-09-201-0/+69
|\ | | | | enable integer multiplication/divison on FiniteDuration, see SI-6389
| * move Duration (incl. DSL) into scala.concurrent.duration packageRoland2012-09-191-1/+1
| | | | | | | | | | | | | | | | | | so that the full package can be imported naturally: import scala.concurrent.duration._ will give you all the types (Duration, FiniteDuration, Deadline) and the DSL for constructing these.
| * improve performance of integer multiplication overflow check on DurationRoland2012-09-191-0/+69
| | | | | | | | | | - also rename divisor arguments to “divisor” - and add a scalacheck for multiplication overflow detection
* | Add RedBlackTree tests for take/drop/slice.Juha Heljoranta2012-09-181-0/+42
|/ | | | Addresses review feedback by axel22.
* Merge pull request #786 from axel22/issue/5986-cherryJosh Suereth2012-06-271-2/+2
|\ | | | | Fix SI-5986.
| * Fix SI-5986.Aleksandar Prokopec2012-06-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Here we had an issue that RedBlack does not work the same way for sets - which are not supposed to replace an element if it is the same (wrt equals) and maps - which should replace the corresponding values. Adding an overwrite parameter which decides whether to overwrite added keys if they are the same in the ordering. Fix tests.
* | Updated scalacheck sources.Paul Phillips2012-06-191-1/+0
|/ | | | | | | | | | | | | | | | | | | | | | | | | To current scalacheck head 7ffda752d8 except for this diff: diff -rw src/scalacheck/org/scalacheck/Arbitrary.scala /s/scalacheck/src/main/scala/org/scalacheck/Arbitrary.scala 13d12 < import scala.reflect.ClassTag 281c280 < implicit def arbArray[T](implicit a: Arbitrary[T], c: ClassTag[T] --- > implicit def arbArray[T](implicit a: Arbitrary[T], c: ClassManifest[T] diff -rw src/scalacheck/org/scalacheck/Prop.scala /s/scalacheck/src/main/scala/org/scalacheck/Prop.scala 63c63 < def mainCallsExit = false --- > def mainCallsExit = true Only in /s/scalacheck/src/main/scala/org/scalacheck: ScalaCheckFramework.scala diff -rw src/scalacheck/org/scalacheck/util/Buildable.scala /s/scalacheck/src/main/scala/org/scalacheck/util/Buildable.scala 13d12 < import scala.reflect.ClassTag 34c33 < implicit def buildableArray[T](implicit cm: ClassTag[T]) = --- > implicit def buildableArray[T](implicit cm: ClassManifest[T]) =
* removes array tagsEugene Burmako2012-06-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before 2.10 we had a notion of ClassManifest that could be used to retain erasures of abstract types (type parameters, abstract type members) for being used at runtime. With the advent of ClassManifest (and its subtype Manifest) it became possible to write: def mkGenericArray[T: Manifest] = Array[T]() When compiling array instantiation, scalac would use a ClassManifest implicit parameter from scope (in this case, provided by a context bound) to remember Ts that have been passed to invoke mkGenericArray and use that information to instantiate arrays at runtime (via Java reflection). When redesigning manifests into what is now known as type tags, we decided to explore a notion of ArrayTags that would stand for abstract and pure array creators. Sure, ClassManifests were perfectly fine for this job, but they did too much - technically speaking, one doesn't necessarily need a java.lang.Class to create an array. Depending on a platform, e.g. within JavaScript runtime, one would want to use a different mechanism. As tempting as this idea was, it has also proven to be problematic. First, it created an extra abstraction inside the compiler. Along with class tags and type tags, we had a third flavor of tags - array tags. This has threaded the additional complexity though implicits and typers. Second, consequently, when redesigning tags multiple times over the course of Scala 2.10.0 development, we had to carry this extra abstraction with us, which exacerbated the overall feeling towards array tags. Finally, array tags didn't fit into the naming scheme we had for tags. Both class tags and type tags sound logical, because, they are descriptors for the things they are supposed to tag, according to their names. However array tags are the odd ones, because they don't actually tag any arrays. As funny as it might sound, the naming problem was the last straw that made us do away with the array tags. Hence this commit.
* repairs the tests after the refactoring spreeEugene Burmako2012-06-081-1/+2
|
* resurrects manifests in their pre-2.10 gloryEugene Burmako2012-04-231-0/+37
|
* migrates stdlib and compiler to tagsEugene Burmako2012-04-231-5/+4
| | | | | * all usages of ClassManifest and Manifest are replaced with tags * all manifest tests are replaced with tag tests
* Merge remote-tracking branch 'axel22/feature/collection-concurrent' into developPaul Phillips2012-03-272-11/+11
|\
| * Rename ConcurrentTrieMap to concurrent.TrieMap.Aleksandar Prokopec2012-03-272-11/+11
| | | | | | | | | | | | | | | | Introduced the collection.concurrent package and introduced the concurrent.Map trait there. Deprecated the mutable.ConcurrentMap trait. Pending work - introduce the appropriate changes to JavaConversions and JavaConverters.
* | Regex improvementsDaniel C. Sobral2012-03-231-0/+32
|/ | | | | | | | | | | This adds findAllMatchIn to Regex to mirror other similar methods. It also overloads StringLike's "r", adding a version that accepts group names. It includes test cases for both methods. Closes SI-2460.
* Renaming Ctrie to ConcurrentTrieMap.Aleksandar Prokopec2012-03-163-14/+14
|
* Add tasksupport as a configurable field in parallel collections.Aleksandar Prokopec2012-02-231-1/+1
| | | | | | | | | This required a bit of refactoring in the tasks objects and implementations of various operations. Combiners now hold a reference to a tasksupport object and pass it on to their result if `resultWithTaskSupport` is called. Additionally, several bugs that have to do with CanBuildFrom and combiner resolution have been fixed.
* Merge remote-tracking branch 'erikrozendaal/SI-5331' into developPaul Phillips2012-02-154-32/+554
|\
| * Custom implementations of drop/take/slice.Erik Rozendaal2012-01-232-5/+31
| | | | | | | | This mainly helps performance when comparing keys is expensive.
| * Custom coded version of range/from/to/until.Erik Rozendaal2012-01-211-16/+10
| | | | | | | | | | This avoids unnecessary allocation of Option and Function objects, mostly helping performance of small trees.
| * Optimized implementation of TreeMap/TreeSet#to method.Erik Rozendaal2012-01-153-13/+54
| | | | | | | | Performance of `to` and `until` is now the same.
| * Test for maximum height of red-black tree.Erik Rozendaal2012-01-081-0/+5
| |
| * Fix silly copy-paste error.Erik Rozendaal2012-01-071-9/+9
| |
| * Tests for takeWhile/dropWhile/span.Erik Rozendaal2012-01-072-0/+30
| | | | | | | | Also simplified implementation of span to just use splitAt.