[Tests] Run KMP tests in Analysis API LL FIR test suites
New tests are red in current commit! All `.ll.kt` files are just copies of `.fir.kt` or `.kt`. This will be fixed in the next commit to clearly show difference between LL and FIR. The original purpose of this change was to test `ACTUAL_ANNOTATIONS_NOT_MATCH_EXPECT` diagnostic, for which FIR checker will be run only in IDE (to be changed in next MR), so its reports a lost from usual KMP tests. But this looks like a useful change for all KMP tests, not only this diagnostic. ^KT-62559
This commit is contained in:
committed by
Space Team
parent
026ad1cebc
commit
29980c6b85
+7
-1
@@ -59,7 +59,13 @@ abstract class AbstractCompilerBasedTestForFir : AbstractCompilerBasedTest() {
|
||||
|
||||
useMetaTestConfigurators(::LLFirMetaTestConfigurator)
|
||||
useAfterAnalysisCheckers(::LLFirIdenticalChecker)
|
||||
useAfterAnalysisCheckers(::LLFirDivergenceCommentChecker)
|
||||
|
||||
// For multiplatform tests it's expected that LL and FIR diverge,
|
||||
// because IR actualizer doesn't run in IDE mode tests.
|
||||
forTestsNotMatching("compiler/testData/diagnostics/tests/multiplatform/*") {
|
||||
useAfterAnalysisCheckers(::LLFirDivergenceCommentChecker)
|
||||
}
|
||||
|
||||
useAfterAnalysisCheckers(::LLFirTestSuppressor)
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ fun String.removeLlFirDivergenceDirective(trimLines: Boolean): String {
|
||||
return if (findDirectiveInLines(iterator)) {
|
||||
// `trimStart` ensures that the `LL_FIR_DIVERGENCE` directive can be separated from the rest of the file by blank lines.
|
||||
iterator.asSequence().concatLines(trimLines).trimStart()
|
||||
} else this
|
||||
} else this.trim() // Trim start and end newlines in file if directive not found
|
||||
}
|
||||
|
||||
private fun Sequence<String>.concatLines(trimLines: Boolean): String =
|
||||
|
||||
+2295
-307
File diff suppressed because it is too large
Load Diff
+2295
-307
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user