aboutsummaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Refactor explanation interpolatorFelix Mulder2016-10-101-3/+1
|
* Remove duplication of console reportersFelix Mulder2016-10-101-1/+3
|
* Make relevant parts of compiler conform to new error handlingFelix Mulder2016-10-102-4/+4
|
* Add modifiers to highlightingFelix Mulder2016-10-103-7/+10
|
* Add `Comments` object instead of `Scanners.Comment` case classFelix Mulder2016-10-061-45/+45
|
* Merge pull request #1492 from dotty-staging/add-inlineGuillaume Martres2016-10-063-3/+35
|\ | | | | Implement inline
| * Add InlineBytecodeTests to check that inline really worksGuillaume Martres2016-10-051-0/+32
| |
| * DottyBytecodeTest: fix diffInstructions outputGuillaume Martres2016-10-051-1/+1
| |
| * 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.
* | Merge pull request #1494 from martijnhoekstra/wintestsFelix Mulder2016-10-068-18/+52
|\ \ | |/ |/| [WIP] fix encoding issues
| * test negtest path with / rather than path separatorMartijn Hoekstra2016-09-081-1/+1
| |
| * honor -encoding compiler flag and defaultsMartijn Hoekstra2016-09-075-9/+18
| | | | | | | | | | | | | | | | | | 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
| * force UTF-8 for slurp and writeMartijn Hoekstra2016-09-071-2/+28
| |
| * ignore REPL transscript line ending differencesMartijn Hoekstra2016-09-071-2/+2
| |
| * normalize paths for testsMartijn Hoekstra2016-09-073-5/+4
| |
* | Make InterpolatedString conform to ordering requirementMartin Odersky2016-09-241-2/+2
|/ | | | Arrange its sub-elements so that they appear strictly left to right.
* Merge pull request #1461 from dotty-staging/fixes-gadtsodersky2016-08-261-0/+1
|\ | | | | Fixes of GADTs and test recategorization.
| * 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.
* | Fix a couple of warnings.Nicolas Stucki2016-08-261-1/+0
|/
* Merge pull request #1453 from felixmulder/topic/dottydocodersky2016-08-241-45/+45
|\ | | | | Add dottydoc
| * Add module member lookupFelix Mulder2016-08-191-45/+45
| |
* | Add passing testMartin Odersky2016-08-181-0/+7
|/ | | | Needs to be done in pos-special because junit tests do not recognize _1, _2.
* Fix readLine in TestREPL to align with Ammonite readerMartin Odersky2016-08-161-3/+11
| | | | | | Needs to read several input lines at once. Enables repl test of new error messages.
* Merge pull request #1289 from dotty-staging/fix/partest-separateGuillaume Martres2016-07-272-27/+58
|\ | | | | partest: Enable separate compilation
| * partest: put more stuff on javac classpathGuillaume Martres2016-07-271-0/+56
| | | | | | | | | | | | | | | | Some java tests require the scala-library to be present on the classpath, this fixes tests/pos/java-interop/{t1186, t1235, t1254, t1642}. Also correctly redirect the output of javac so that it will be displayed by partest --verbose
| * partest: Enable separate compilation and javac testsGuillaume Martres2016-07-272-27/+2
| | | | | | | | | | | | | | | | | | | | | | | | partest can separately compile files based on their suffix (_1, _2, ...), it turns out that this feature was never enabled in the dotty version of partest and no one noticed (it prints warnings in ./tests/partest-generated/gen.log which no one reads), tests with *.java files should be compiled both with javac and dotty, but compiling with javac was also disabled. Enabling this revealed some latent bugs that will be fixed in the next few commits.
* | Fixes #1316: Remove JLineKazuyoshi Kato2016-07-271-5/+0
|/ | | | | Dotty uses ammonite.terminal since April (53bd25f) which replaces JLine. There is no reason to keep it anymore.
* Fix #1401: Make sure all refs are forwardedMartin Odersky2016-07-211-1/+1
| | | | | | | | | | | | Faced with recursive dependencies through self types, we might have to apply `normalizeToClassRefs` to a class P with a parent that is not yet initialized (witnessed by P's parents being Nil). In that case we should still execute forwardRefs on P, but we have to wait in a suspension until P is initialized. This avoids the problem raised in #1401. I am still not quite sure why forwardRefs is needed, but it seems that asSeenFrom alone is not enough to track the dependencies in this case.
* Disable stdlib testMartin Odersky2016-07-181-1/+1
| | | | | | | | | | | | | | | Interestingly, adding mutable.BufferLike to the whitelist succeeds under junit but fails under partest. Unfortunately I can't see any output in the log indicating what went wrong. I only see this: !! 306 - pos/compileStdLib [compilation failed] # Failed test paths (this command will update checkfiles) test/partest --update-check \ /Users/odersky/workspace/dotty/tests/partest-generated/pos/compileStdLib
* Add test to whitelistMartin Odersky2016-07-171-0/+1
| | | | This should have been done in a PR that was merged before.
* Fix error printing in compiler testMartin Odersky2016-07-161-9/+7
| | | | Error messages were suppressed so far, now get printed.
* 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
* | Merge pull request #1343 from dotty-staging/change-hk-direct2odersky2016-07-151-1/+1
|\ \ | | | | | | Direct representation of higher-kinded types
| * | 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.
* | | Fix #1336: Discard reporter output for tests that succeed.Nicolas Stucki2016-07-071-5/+20
|/ /
* | partest: correct line numbers in run stack tracesGuillaume Martres2016-06-301-6/+2
| | | | | | | | | | | | | | partest adds a warning in a comment at the beginning of source files that it copies, but this means that every line number displayed in a stack trace is offset by 6. We can workaround this by making the warning a single line with no newline at the end.
* | Add tests fixing #1322Felix Mulder2016-06-211-0/+89
|/
* 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.
* Merge pull request #1251 from felixmulder/topic/fix-stdoutredirect-replFelix Mulder2016-06-011-0/+3
|\ | | | | Fix stdout redirect for REPL's println
| * Use ChoiceSetting for coloringFelix Mulder2016-05-121-1/+1
| |
| * Add CLI option to disable REPL syntax highlightingFelix Mulder2016-05-121-2/+4
| |
| * Strip colors from output in TestREPLFelix Mulder2016-05-121-1/+2
| |
* | 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`) ?
* | Merge pull request #1256 from felixmulder/topic/test-bcodeDmitry Petrashko2016-05-274-0/+713
|\ \ | | | | | | Add bytecode checking infrastructure
| * | Add tests for primitive construction as well as reference and boxed unit arraysFelix Mulder2016-05-183-3/+100
| | |
| * | Add test for `Array.ofDim`Felix Mulder2016-05-171-0/+24
| | |
| * | Fix #1258: correct behavior for annotated valuesFelix Mulder2016-05-172-19/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | Annotated values are encapsulated in a `ConcreteAnnotation`, as such, the statement `tpe isRef defn.IntClass` would yield false despite the annotated reference being an Int. The tpe is now unwrapped if it has an annotation. If the transformation fails despite having the annotation the compiler will warn.
| * | Add switch verification testFelix Mulder2016-05-172-2/+62
| | |