Also use updated diagnostic pattern in TreesCompareTest.
In rare cases diagnostic was cut too early on !> characters,
that were a part of diagnostic parameter:
<!DIAGNOSTIC("Type<DefinitelyNotNullTypeArgument!!>")!>
This change adds D8 in addition to Dx which is being deprecated.
At some point after the official Dx deprecation, we should remove
the Dx checker.
Moving to D8 has the additional benefit that D8 can dex code
using java 8 features without using a separate desugaring tool.
Previously, GradleDaemonAnalyzer reused common IJ infrastructure for
highlighting tests (see DaemonAnalyzerTеstCase, ExpectedHighlightingData
and such).
Unfortunately, this infrastructure had several flaws,
mainly around checking expected highlighting against actual one:
- overlapping line markers lead to crash (fixed in 193+)
- no way to sanitize descriptions of line markers (important for cases
where description returns HTML-formatted text, which makes testdata
completely unreadable and also drives parser insane)
- thrown FileNotFoundException doesn't have a physical file with
expected testdata attached, which makes browsing diff a little less
convenient (no way to apply changes to expected file)
- no easy way to plug-in with additional after-highlighting checks
This commit fixes it by overriding doCheckResult and providing custom
checking of highlighting/line markers, based on TagsTestDataUtil.
Because we don't rely on IJ-checking anymore, we also remove weird hoops
with removing/adding testdata markup in checkFiles.
Also this commit adds strings sanitization in TagsTestDataUtil, removing HTML-tags
and line breaks, so that description of tag is always one-liner with
plain text.
DiagnosticsTestWithStdLib now require stdlib only.
Move test data accordingly.
The only test that required kotlin-reflect is transformed into
codegen box test.
AbstractCheckLocalVariablesTableTest and fix
`checkLocalVariablesTable/localFun.kt` for JVM IR.
Also improved diagnosability of CheckLocalVariablesTableTest failures.