You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|Test '$title' compiled with $errors error(s) and $warnings warning(s),
1372
1392
|the test can be reproduced by running:
1373
1393
|
1374
-
| sbt "testFromTasty$file"
1394
+
| sbt "testCompilation --from-tasty$file"
1375
1395
|
1376
1396
|This tests can be disabled by adding `${file.getName}` to `compiler${JFile.separator}test${JFile.separator}dotc${JFile.separator}$runOrPos-$listName.blacklist`
Copy file name to clipboardExpand all lines: docs/docs/contributing/testing.md
+18
Original file line number
Diff line number
Diff line change
@@ -80,9 +80,27 @@ This will run both the test `./tests/pos/companions.scala` and
80
80
`./tests/neg/companions.scala` since both of these match the given string.
81
81
This also means that you could run `testCompilation` with no arguments to run all integration tests.
82
82
83
+
When complex checkfiles must be updated, `testCompilation` can run in a mode where it overrides the checkfiles with the test outputs.
84
+
```bash
85
+
$ sbt
86
+
> testCompilation --update-checkfiles
87
+
```
88
+
83
89
### Bootstrapped-only tests
84
90
85
91
To run `testCompilation` on a bootstrapped Dotty compiler, use
86
92
`dotty-compiler-bootstrapped/testCompilation` (with the same syntax as above).
87
93
Some tests can only be run in bootstrapped compilers; that includes all tests
88
94
with `with-compiler` in their name.
95
+
96
+
### From TASTy tests
97
+
98
+
`testCompilation` has a additional mode to run tests that compile code from a `.tasty` file, decompile a `.tasty` file and recompile the decompiled tasty.
99
+
Modify blacklist and whitelists in `compiler/test/dotc` to enable or disable tests from `.tasty` files.
100
+
101
+
```bash
102
+
$ sbt
103
+
> testCompilation --from-tasty
104
+
```
105
+
106
+
This mode can be combined with `--update-checkfiles` to update the `.decompiled` files or can be run under `dotty-compiler-bootstrapped/testCompilation` to test on a bootstrapped Dotty compiler.
0 commit comments