[Tests] Add spec tests in FIR + LightTree configuration
In some tests PSI and LT differ. Test data was fixed accordingly. In the following tests I consider that difference is acceptable: - compiler/tests-spec/testData/diagnostics/linked/expressions/try-expression/p-1/neg/3.1.kt - compiler/tests-spec/testData/diagnostics/linked/expressions/try-expression/p-1/neg/4.1.kt This is because: - It only happens when recovering from syntax errors happened above in code. I was unable to reproduce it in valid code. - It doesn't break parsing further, the rest of the errors in file are reported identically. The rest of the tests will be fixed in subsequent commits. ^KT-62704 Fixed
This commit is contained in:
committed by
Space Team
parent
18b9cf3bc6
commit
8edb1842a5
+6
@@ -26,6 +26,12 @@ abstract class AbstractFirDiagnosticTestSpecBase(parser: FirParser) : AbstractFi
|
||||
}
|
||||
|
||||
abstract class AbstractFirPsiDiagnosticTestSpec : AbstractFirDiagnosticTestSpecBase(FirParser.Psi)
|
||||
abstract class AbstractFirLightTreeDiagnosticTestSpec : AbstractFirDiagnosticTestSpecBase(FirParser.LightTree) {
|
||||
override fun configure(builder: TestConfigurationBuilder) {
|
||||
super.configure(builder)
|
||||
builder.useAdditionalService { LightTreeSyntaxDiagnosticsReporterHolder() }
|
||||
}
|
||||
}
|
||||
|
||||
fun TestConfigurationBuilder.baseFirSpecDiagnosticTestConfiguration(baseDir: String = ".") {
|
||||
defaultDirectives {
|
||||
|
||||
Reference in New Issue
Block a user