There are three test entry points:
* [doTestByMainFile] – test cases with dedicated main file.
Supports everything from single-file cases to multi-platform multi-module
multi-file cases
* [doTestByMainModuleAndOptionalMainFile] – test cases rather around
modules than files
* [doTestByModuleStructure] – all other cases with fully custom logic
Look at the KDoc of the corresponding method for more details.
^KT-64805 Fixed
It's expected to partially mimic the behavior of what
previously was called builder inference, but with more clear contracts
(documentation is in progress, though)
See a lot of fixed issues in the later commits with test data,
especially [red-to-green]
^KT-59791 In Progress
The trove4j library is licensed under LGPL, and that causes some troubles while working with it. The fastutil library provides the same functionality in the context of our needs, and is licensed under the Apache license.
^KTI-1135 In Progress
It affects the `is IrGetField` check in
TypeOperatorLowering.computeNotNullAssertionText, which leads to missing
NPE messages when accessing backing fields of public properties.
#KT-64615
We initially wanted to release the feature in 1.9.0, but found a bug in
K1 KT-54906. It was decided to postpone the feature release to 2.1, but
at this time KOTLIN_2_1 didn't exist
In this commit I make it possible to enable the feature with
-language-version 2.1 flag, so users can "preview" this feature in 2.0
KT-1436
- KT-62895 cannot be reproduced on the Analysis API side. Still, it is
useful to add tests here for better coverage in the future.
- The reason is likely that Analysis API tests specifically use
`SealedClassesInheritorsCaclulatorPreAnalysisHandler` to compute
sealed class inheritors (which are usually the breaking point for
problems in `when` exhaustiveness checking), so the tests do not use
the production implementation. See KT-64505 for future work on this
problem.
^KT-62895
- In dangling file tests, the project structure's main module is a
non-dangling file module. Sealed class inheritors are registered for
that module. However, later when sealed class inheritors are
requested, the FIR class has a dangling file module as its `KtModule`,
which isn't known by the inheritors provider. We need to take the
sealed inheritors of the context module instead.
- `TestModuleStructureFactory.createProjectStructureByTestStructure`
created `KtModule`s for each test module and then also created new
`KtModule`s for binary dependencies. This split worked as long as no
binary dependency was also a test module and thus part of the main
modules. But if not, `addLibraryDependencies` created a duplicate
`KtModule`, instead of referring to the existing binary module.
- The fix registers a main binary library module in the library cache
before it can become the dependency of another main module. Because
main modules can only depend on main modules preceding them in the
list, a separate pass over all main modules is not needed.
^KT-64647 fixed