Skip to content

Commit 6c5679b

Browse files
committed
Re-revert and edit the info about test suffixes
1 parent 9f1339e commit 6c5679b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

docs/_docs/contributing/testing.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,14 @@ $ sbt
127127
> testCompilation --help
128128
```
129129

130+
### Joint and separate sources compilation
131+
132+
When the sources of a test consist of multiple source files places in a single directory they are passed to the compiler in a single run and the compiler decides in which order to compile them. In some cases, however, to reproduce a specific test scenario it might be necessary to compile the source files in several steps in a specified order. To achieve that one can add a `_${step_index}` suffix to a file name (before the `.scala` or `.java` extension) indicating the order of compilation. E.g. if the test directory contains files named `Foo_1.scala`, `Bar_2.scala` and `Baz_2.scala` then `Foo_1.scala` will be compiled first and after that `Bar_2.scala` together with `Baz_2.scala`.
133+
134+
The other kind of suffix that can modify how particular files are compiled is `_c${compilerVersion}`. When specified, the file will be compiled with a specific version of the compiler instead of the one developed on the current branch.
135+
136+
Different suffixes can be mixed together (their order is not important although consistency is advised), e.g. `Foo_1_c3.0.2`, `Bar_2_c3.1.0`.
137+
130138
### Bootstrapped-only tests
131139

132140
To run `testCompilation` on a bootstrapped Dotty compiler, use

0 commit comments

Comments
 (0)