File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -134,3 +134,17 @@ with `with-compiler` in their name.
134134 ```
135135
136136 This mode can be run under ` dotty-compiler-bootstrapped/testCompilation ` to test on a bootstrapped Dotty compiler.
137+
138+ ### SemanticDB tests
139+
140+ The output of the ` extractSemanticDB ` phase, enabled with ` -Ysemanticdb ` is tested with the bootstrapped JUnit test
141+ ` dotty.tools.dotc.semanticdb.SemanticdbTests ` . It uses source files in ` tests/semanticdb/expect ` to generate
142+ two kinds of output file that are compared with "expect files": placement of semanticdb symbol occurrences inline in
143+ sourcecode (` *.expect.scala ` ), for human verification by inspection; and secondly metap formatted output which outputs
144+ all information stored in semanticdb (` metac.expect ` ).
145+ Expect files are used as regression tests to detect changes in the compiler.
146+
147+ The test suite will create a new file if it detects any difference, which can be compared with the
148+ original expect file, or if the user wants to globally replace all expect files for semanticdb they can use
149+ ` dotty-compiler-bootstrapped/test:runMain dotty.tools.dotc.semanticdb.updateExpect ` , and compare the changes via version
150+ control.
You can’t perform that action at this time.
0 commit comments