aboutsummaryrefslogtreecommitdiff
path: root/test/dotc/tests.scala
Commit message (Collapse)AuthorAgeFilesLines
* Move compiler and compiler tests to compiler dirFelix Mulder2016-11-221-358/+0
|
* Move (most) unit tests to correct locationsFelix Mulder2016-11-221-1/+1
| | | | | | Should still perhaps move `test/dotc/tests.scala` and the others in the same directory to a better more cohesive location. Would like to delete the worksheets as well - but maybe they hold sentimental value...
* dottyDependsOnBootedLib should not be a JUnit testGuillaume Martres2016-11-221-1/+1
| | | | As indicated by the comment right above it.
* Fix partest compilation of java-interop tests by moving themGuillaume Martres2016-11-221-1/+1
| | | | | | | | | | Previously, the tests where all in tests/pos/java-interop which means that partest would try to run them as one single test, this failed because some of these tests define classes with the same name. We could fix this by putting them all in separate packages but for now it's simple to move them to tests/pos-java-interop (they will still be run individually as they should thanks to the `java_all` test defined in tests.scala)
* Move sjs, make sure that partest compiles everything in dirsFelix Mulder2016-11-221-31/+24
|
* Add dotty-library to classpath in dottydoc testsFelix Mulder2016-11-221-9/+14
|
* Create dotty-lib.jar for run testsFelix Mulder2016-11-221-16/+48
|
* Pickle Inlined treesMartin Odersky2016-10-171-2/+2
| | | | | | | | Inlined trees should be preserved by pickling so that we keep positions accurate. With that change now all tasty tests are tested for position accuracy.
* Drop erroneous setPos in TreeUnpickler.Martin Odersky2016-10-171-1/+1
| | | | | With that change, all files tested in pickleOK have the same positions before and after pickling.
* fix #1274: test for dotty bootstrap based on tastyliu fengyun2016-10-131-11/+35
|
* Add modifiers to highlightingFelix Mulder2016-10-101-1/+2
|
* Merge pull request #1492 from dotty-staging/add-inlineGuillaume Martres2016-10-061-2/+2
|\ | | | | Implement inline
| * Make inline annotation @scala.inline.Martin Odersky2016-10-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Drop @dotty.annotation.inline. This will inline all @inline marked methods in Scala for which a body is known (i.e. that are either compiled in the same run or have Tasty trees available). Option -Yno-inline suppresses inlining. This is needed for the moment because some @inline methods access private members or members that are otherwise inaccessible at the call-site. Also fixes some problems in Inliner - make sure type arguments to inline calls re fully defined - don't forget recursive calls in typeMap - don't forget positions in treeMap - drop dead code dealing with outer.
* | honor -encoding compiler flag and defaultsMartijn Hoekstra2016-09-071-3/+7
|/ | | | | | | | | rename test/pos/valueclasses to pos_valueclasses tests/pos/valueclasses generates a valueclasses.flags file in /tests/partest-generated/pos that conflicts with the valueClasses.flags file that tests/neg/valueClasses.scala tries to create
* Recategorize testsMartin Odersky2016-08-261-0/+1
| | | | | | | | | Passing tests from pending/pos go in pos. Some others go in diabled/not-testable. These are tests that require a compilation order which we cannot yet do with our unit testing framework. Compiling them alltogether (as is now doen in junit) does not work either for them because they contain a duplicate class.
* Add passing testMartin Odersky2016-08-181-0/+7
| | | | Needs to be done in pos-special because junit tests do not recognize _1, _2.
* Merge pull request #1334 from dotty-jvican/implement-no-predef-no-importDmitry Petrashko2016-07-151-0/+4
|\ | | | | Implement -Yno-predef and -Yno-imports
| * Implement -Yno-predef and -Yno-importsjvican2016-06-291-0/+4
| | | | | | | | | | | | * Implement flags -Yno-predef and -Yno-imports * Add unit tests for both
* | Disallow higher-kinded types that simulate general existential typesMartin Odersky2016-07-111-1/+0
| | | | | | | | | | | | | | | | | | | | | | We cannot handle such types in general. So we now check that a hk application C[args] where some of the arguments are wildcards does not have as a supertype a hk application ([X] -> B)[args]
* | Change testsMartin Odersky2016-07-111-0/+1
|/ | | | | | | | | | | | | | | | - compileMixed failed because there was a cycle between immutable.Seq (compiled) and parallel.ParSeq (loaded from classfile). Inspection of the completion log (turn completions Printer on) and the stack trace showed that there's nothing we can do here. The old hk scheme did not go into the cycle because it did not force an unrelated type. I believe with enough tweaking we would also hva egotten a cycle in the old hk scheme. The test is "fixed" by adding parallel.ParSeq to the files to compile. - Disable named parameter tests Those tests do not work yet with the revised hk scheme. Before trying to fix this, we should first decide what parts of named parameters should be kept.
* Properly report errors when cli flags are malformedGuillaume Martres2016-06-021-0/+3
| | | | | Previously we returned an empty Reporter with no errors so partest reported the test as a success.
* Add sbt incremental compilation supportGuillaume Martres2016-05-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To test this with sbt, see https://github.com/lampepfl/dotty/wiki/Using-Dotty-with-sbt The following flags are added: - -Yforce-sbt-phases: Run the phases used by sbt for incremental compilation (ExtractDependencies and ExtractAPI) even if the compiler is ran outside of sbt, for debugging. - -Ydump-sbt-inc: For every compiled foo.scala, output the API representation and dependencies used for sbt incremental compilation in foo.inc, implies -Yforce-sbt-phases. This commit introduces two new phases which do not transform trees: - `ExtractDependencies` which extracts the dependency information of the current compilation unit and sends it to sbt via callbacks - `ExtractAPI` which creates a representation of the API of the current compilation unit and sends it to sbt via callbacks Briefly, when a file changes sbt will recompile it, if its API has changed (determined by what `ExtractAPI` sent) then sbt will determine which reverse-dependencies (determined by what `ExtractDependencies` sent) of the API have to be recompiled depending on what changed. See http://www.scala-sbt.org/0.13/docs/Understanding-Recompilation.html for more information on how sbt incremental compilation works. This phase was originally based on https://github.com/adriaanm/scala/tree/sbt-api-consolidate/src/compiler/scala/tools/sbt which attempts to integrate the sbt phases into scalac (and is itself based on https://github.com/sbt/sbt/tree/0.13/compile/interface/src/main/scala/xsbt), but it has been heavily refactored and adapted to Dotty. The main functional differences are: - ExtractDependencies runs right after Frontend (so that we don't lose dependency informations because of the simplifications done by PostTyper), but ExtractAPI runs right after PostTyper (so that SuperAccessors are part of the API). - `ExtractAPI` only extract types as they are defined and never "as seen from" some some specific prefix, see its documentation for more details. - `ExtractDependenciesTraverser` and `ExtractUsedNames` have been fused into one tree traversal in `ExtractDependenciesCollector`. TODO: Try to run these phases in parallel with the rest of the compiler pipeline since they're independent (except for the sbt callbacks in `GenBCode`) ?
* Downwards comparisons for implicit search and overloading resolutionMartin Odersky2016-05-231-2/+2
| | | | | | | | | Compare selected contravariant arguments as if they were covariant. Which ones is explained in the doc comment for method `isAsSpecificValueType` in Applications.scala. This has the same motivation than what @paulp proposed around 2012. The solution is a bit different from the one proposed then because it only affects top-level parameters.
* Fix testMartin Odersky2016-05-191-2/+2
| | | | | | | | | | The previous additional test messed up partest in that file Types.scala was copied twice into the partest-generated directory and then the pos/core tests would compile both copies. This gave a double definition which manifested itself under -Yno-double-bindings as an assertion error. Ideally, partest generation would guard against this situation. For now I avoid the problem by compiling the whole of core without -Ycheck, not jst Types.scala.
* Fix dotc bootstrap failureMartin Odersky2016-05-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | During an attempted dotty bootstrap it was noted that Types.scala did not compile anymore, because `checkUnique` threw a `TypeError` during erasure. The issue was an overloaded member `name` in TermrefWithSig. In NamedType: def name: Name In TermRef: def name: TermName Before erasure, there's one member `name`, after erasure there are two (because after erasure result type counts). The error arose when trying to recompute a member of a `TermRefWithSig` where the name is `name` and the expected signature is `(Nil, ?)`. Since there are two members that match the name and the signature, `checkUnique` triggered a `TypeError`. Before adding `checkUnique`, the previous `atSignature` call would just have returned an arbitrary choice among the two alternative definitions of `name`. The fix is not to use `checkUnique` but to fall back to `d.current` in the case where several alternatives appear. Interestingly, the failure only triggers when -Ycheck options are *disabled*. I added a new test that compiles Types.scala without checks, so we catch this and possibly similar bugs in the future.
* Test caseMartin Odersky2016-05-181-1/+2
|
* Update TASTY tests for dotty/srcVladimirNik2016-04-131-14/+3
|
* Rearrange pickle testsMartin Odersky2016-04-091-1/+4
| | | | | | | 1) Move passing test to pickling 2) Add test case for #1212 in pending 3) Disable annotations/internal in pickling tests. They lead to a stable symbol error which is explainable (modifiers are read before symbol is created).
* Drop Mode.scala from tasty_typer testMartin Odersky2016-04-011-1/+1
| | | | File was moved, it's no longer in package typer.
* Fix build.Dmitry Petrashko2016-03-311-2/+2
|
* Merge pull request #1182 from dotty-staging/repl-fixesodersky2016-03-311-0/+2
|\ | | | | Repl fixes and tests
| * Add REPL testsMartin Odersky2016-03-181-0/+2
| |
* | TASTY tests for src/dottyVladimirNik2016-03-241-10/+78
|/
* Rewrite testMartin Odersky2016-03-121-0/+2
| | | | Test rewritings that were implemented so far.
* Neg tests: remove negTest flag; neg tests are binded to neg directoryVladimirNik2016-03-031-12/+12
|
* Neg tests: remove xerror parameter from tests (compute based on // error)VladimirNik2016-03-031-79/+14
|
* Merge pull request #1111 from dotty-staging/fix-#1099Dmitry Petrashko2016-03-021-1/+0
|\ | | | | Special case pattern matching against abstract types with class tags
| * Remove bogus testMartin Odersky2016-02-201-1/+0
| | | | | | | | | | Tests failures were caused by previous incomplete implementation of classTag.
* | Merge pull request #1112 from dotty-staging/value-classes-private-this-paramDmitry Petrashko2016-02-201-1/+1
|\ \ | |/ |/| Value classes: add support for private[this] parameter
| * fix to neg_valueClasses testVladimirNik2016-02-191-1/+1
| |
* | Merge pull request #1066 from dotty-staging/fix-#997odersky2016-02-191-0/+2
|\ \ | | | | | | Fix #997
| * | Fix expected error countMartin Odersky2016-02-191-1/+1
| | |
| * | Add checking for leaking private definitionsMartin Odersky2016-02-191-0/+2
| |/ | | | | | | First version. Fixes #997.
* | Allow Named Arguments in TypeArgsMartin Odersky2016-02-191-1/+1
| | | | | | | | Lets one also pass named arguments to methods.
* | Check named type params for welformedness rules.Martin Odersky2016-02-191-0/+1
|/
* Merge pull request #898 from dotty-staging/add/auto-uncurryodersky2016-02-181-0/+1
|\ | | | | Implement auto tupling of function arguments
| * Strengthen requirement for auto-tuplingMartin Odersky2016-02-161-1/+1
| | | | | | | | | | | | | | Was: corresponding parameter types "are compatible". Now: corresponding parameter types "conform". This avoids the inconsistency mentioned by @retronym in #897.
| * Auto-uncurry n-ary functions.Martin Odersky2016-02-161-0/+1
| | | | | | | | Implements SIP #897.
* | Add checks for value classes:VladimirNik2016-02-161-0/+1
|/ | | | | 1. Add errors in case of incorrect parameter; 2. Improvement to error message if value class is defined as a local class;
* Merge pull request #1081 from dotty-staging/fix-#645Dmitry Petrashko2016-02-121-0/+1
|\ | | | | Add test case for #645