Skip to content

Reenable bootstrap-only tests disabled/dropped in #4833 #4862

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 29, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class BootstrappedOnlyCompilationTests extends ParallelTesting {
compileDir("compiler/src/dotty/tools/dotc/util", defaultOptions) +
compileDir("compiler/src/dotty/tools/io", defaultOptions) +
compileDir("compiler/src/dotty/tools/dotc/core", TestFlags(classPath, noCheckOptions))
}
}.checkCompile()

@Test def posTwiceWithCompiler: Unit = {
implicit val testGroup: TestGroup = TestGroup("posTwiceWithCompiler")
Expand Down
9 changes: 8 additions & 1 deletion docs/docs/contributing/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ You can also run all paths of classes of a certain name:
These tests are Scala source files expected to compile with Dotty (pos tests),
along with their expected output (run tests) or errors (neg tests).

All of these tests are contained in the `./tests/*` directories and can be run with the `testCompilation` command.
All of these tests are contained in the `./tests/*` directories and can be run with the `testCompilation` command. Tests in folders named `with-compiler` are an exception, see next section.

Currently to run these tests you need to invoke from sbt:

Expand All @@ -79,3 +79,10 @@ $ sbt
This will run both the test `./tests/pos/companions.scala` and
`./tests/neg/companions.scala` since both of these match the given string.
This also means that you could run `testCompilation` with no arguments to run all integration tests.

### Bootstrapped-only tests

To run `testCompilation` on a bootstrapped Dotty compiler, use
`dotty-compiler-bootstrapped/testCompilation` (with the same syntax as above).
Some tests can only be run in bootstrapped compilers; that includes all tests
with `with-compiler` in their name.
16 changes: 16 additions & 0 deletions tests/pos-with-compiler/lazyValsSepComp.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package dotty.tools
package io

import java.io.{ InputStream }
import java.util.jar.JarEntry
import dotty.tools.dotc.core.Definitions
import language.postfixOps
import dotty.tools.dotc.core.Contexts._


/** A test to trigger issue with separate compilation and lazy vals */
object Foo {
val definitions: Definitions = null
def defn = definitions
def go = defn.FunctionClassPerRun
}