Commit Graph

94 Commits

Author SHA1 Message Date
Marco Pennekamp 88ac5727cc [LL FIR] KT-50732 Add support for LL FIR-specific tests (.ll.kt)
- `.ll.kt` test data can be added in cases where LL FIR resolution
  legally diverges from K2 compiler results.
- Each `.ll.kt` test is prefixed with an `LL_FIR_DIVERGENCE` directive
  which must explain why the test may diverge from K2 compiler results.
  - `LLFirDivergenceCommentChecker` ensures that each `.ll.kt` file
    contains an `LL_FIR_DIVERGENCE` directive.
- `LLFirIdenticalChecker` results in an assertion error if the `.ll.kt`
  test and its base test are completely identical, including in their
  meta info (but ignoring `LL_FIR_DIVERGENCE`).
  - The checker additionally ensures that the base source file and the
    `.ll.kt` source file have identical Kotlin source code (ignoring
    meta info and `LL_FIR_DIVERGENCE`). This ensures that both tests
    test the exact same thing.
- `.ll.kt` files are ignored by select test generators, in addition to
  `.fir.kt` files.
2023-01-16 15:20:50 +00:00
Vladimir Dolzhenko ca31307941 [AA] Add expectForActual
#KT-54864

Merge-request: KT-MR-8222
Merged-by: Vladimir Dolzhenko <Vladimir.Dolzhenko@jetbrains.com>
2023-01-13 21:36:04 +00:00
Justin Paupore fbcde11b04 [AA] Add meta-annotation test for analysis API.
This test ensures that annotations on other annotations are properly
handled, even if those annotations are defined in Java rather than in
Kotlin.

Note that this functionality only works on FIR, and currently has bugs
that mean the result is an error type. Follow-on changes will fix the
error-type bug, and restore proper functionality for FIR.
2023-01-12 19:48:21 +09:00
Ilya Kirillov 20b81464be [Analysis API] fix IndexOutOfRangeException
Previously, the `KtFirUsualClassType.qualifiers` was empty for the local classes

The reason was a RawFirBuilder setting up a containingClassForLocalAttr
to the outer non-local class for the local class. It should be a null instead,
see the localClassType.kt as an example

^KT-55510 fixed
2023-01-10 12:54:18 +00:00
Anna Kozlova d7179d929f [LC] add isEquivalentTo implementation so LC can be referenced from java
otherwise references from java to ktElements won't be treated as references,
cause java references resolve to light elements and search can/should be called
on ktElements
2023-01-09 18:43:57 +00:00
Dmitrii Gridin 6db0aaef35 [SLC] rename test classes according to new directories 2023-01-02 15:05:45 +00:00
Dmitrii Gridin 3e36e51920 [LC] merge ultraLightFacades tests to lightClassByPsi 2023-01-02 15:05:42 +00:00
Dmitrii Gridin 0731780865 [LC] rename ultraLightClasses to lightClassByPsi 2023-01-02 15:05:38 +00:00
Dmitrii Gridin 742c3de112 [LC] rename lightClasses/lightClasses to lightClasses/lightClassByFqName 2023-01-02 15:05:37 +00:00
Dmitrii Gridin eb3ad7e6b1 [LC] move light class related tests to one directory 2023-01-02 15:05:36 +00:00
Dmitrii Gridin b2c0a37050 [SLC] implement infrastructure for light class hierarchy tests 2022-12-13 16:54:25 +00:00
Ilya Kirillov 2378437b30 [Analysis API FIR] do not create resolved KtTypes for unresolved ones 2022-11-11 12:00:00 +01:00
Jinseong Jeon c9a2e10dd7 AA: merge single/multi modules tests for PsiTypeProvider
...because single-module test is also multi-module test
2022-11-02 17:38:16 +01:00
Jinseong Jeon d98081dce2 AA: introduce MPP tests for PsiTypeProvider 2022-11-02 17:38:16 +01:00
Ilya Kirillov e2416f48fe [Analysis API] add tests for containing declaration for delegated member scope 2022-10-26 19:19:04 +00:00
Ilya Kirillov 97df0a0902 [Analysis API] rework containing declaration provider
now it should work for non-source declarations
2022-10-26 19:19:00 +00:00
Dmitrii Gridin b8a64d20ac [AA] restore Fe10IdeNormalAnalysisSourceModuleSymbolByReferenceTestGenerated
^KT-54311
^KT-54385
2022-10-17 14:59:50 +00:00
Kristoffer Andersen f765457e51 [K2] isUsedAsExpression analysis 2022-10-05 15:06:52 +00:00
Ilya Kirillov 49f2f85927 [Low Level FIR] fix exception when creating symbol by invalid code 2022-10-04 12:56:07 +00:00
Ilya Kirillov 2d7218b542 [Analysis API FIR] fix test generation 2022-10-03 16:02:23 +02:00
Ilya Kirillov cd5b9d6356 [Analysis API] do not generate standalone tests which use compiler plugin 2022-09-21 09:44:24 +02:00
Jinseong Jeon e50da634bc AA: add tests for resolution to built-ins 2022-09-17 16:43:12 +02:00
Vladimir Sukharev c8864369fd Use main class as test generator name
Merge-request: KT-MR-7031
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2022-09-09 12:51:18 +00:00
Jinseong Jeon 846ab7d97b AA: revamp standalone-mode tests 2022-08-17 19:16:17 +02:00
Ilya Kirillov 8856977c78 [Symbol LC] add test for declaration parents 2022-08-10 22:49:12 +02:00
Jinseong Jeon 199219483e FIR LC: set modifier list as a parent of light annotations
^KTIJ-22354 Fixed
2022-08-03 08:57:37 +02:00
Ilya Kirillov 36f370f501 [Analysis API] add tests for KtTypeScope 2022-06-22 09:31:47 +02:00
Ilya Kirillov b9907963fe [Analysis API] add tests for KtSubstitutor 2022-06-22 09:31:47 +02:00
Ilya Kirillov f966959615 [Analysis API] disable not passing new Analysis API tests for FE10 2022-06-22 09:31:46 +02:00
Ilya Kirillov dafb132a17 [Analysis API] add few tests which checks contracts of signature substitutions 2022-06-22 09:31:43 +02:00
Ilya Kirillov 3525e42f11 [Analysis API] introduce substitutor builder 2022-06-22 09:31:43 +02:00
Ilya Kirillov c95ac9f845 [Analysis API] add some basic tests for symbol substitution 2022-06-22 09:31:42 +02:00
Ilya Kirillov a47880a98b [stubs] add test which checks consistency between cls and decompiled stubs 2022-06-20 19:09:44 +02:00
Jinseong Jeon b18999be82 FIR/LC: filter out scripts for facade creation
^KTIJ-22016 Fixed
2022-06-20 17:38:50 +02:00
Mikhail Glukhikh 8fce239209 Generate even more FE10 analysis API tests 2022-05-31 11:34:47 +00:00
Ilya Kirillov b511e449d2 [analysis api] temporary mute Fe10IdeNormalAnalysisSourceModuleSymbolByReferenceTestGenerated 2022-05-27 15:37:39 +02:00
Mikhail Glukhikh 049cab5207 Generate more FE10 analysis API tests 2022-05-25 12:04:54 +00:00
Ilya Kirillov 329e495b63 [analysis api, tests] generate analysis api in a separate tests-gen folder 2022-04-13 12:53:14 +02:00
Ilya Kirillov 22918ac2f4 [analysis api, tests] generate standalone tests 2022-04-13 12:53:08 +02:00
Ilya Kirillov 037c50c26b [analysis api, tests] move test classes to corresponding packages 2022-04-13 12:53:06 +02:00
Ilya Kirillov 78685e93d1 [analysis api, tests] move resolve call tests to separate package 2022-04-13 12:53:05 +02:00
Ilya Kirillov 4bd7fed1ea [analysis api, test] rework test infrastructure, add multimodule tests 2022-04-13 12:53:01 +02:00
Ilya Kirillov 1e5cf80278 [analysis api, refactoring] move base test cases to base modules, improve service names 2022-04-13 12:53:00 +02:00
Ilya Kirillov 443ee4c860 [analysis api] allow generating test with for with more possible parameters 2022-04-13 12:52:59 +02:00
Ilya Kirillov 12e0254918 [analysis api] simplify dependent analysis mode tests 2022-04-13 12:52:58 +02:00
Ilya Kirillov 3206c0ce87 [analysis api, refactoring] get rid of HL name in class names 2022-04-13 12:52:57 +02:00
Jinseong Jeon 46707b0426 AA: test evaluation mode with same test inputs 2022-03-11 13:51:16 +01:00
Jinseong Jeon 606033e1e6 AA: introduce KtConstantEvaluationMode 2022-03-11 13:51:15 +01:00
Mark Punzalan afb34d3193 Analysis API: Implement KtCallResolver.collectAllCandidates for FE 1.0. 2022-02-17 19:51:35 +01:00
Mark Punzalan 0ed802bca4 Analysis API: Add tests for KtCallResolver.resolveCandidates(). 2022-02-11 13:22:57 +01:00