Commit Graph

2337 Commits

Author SHA1 Message Date
Marco Pennekamp 78ef58bef4 [AA] Tests: Remove decompiled files from LibraryBinary and add LibraryBinaryDecompiled
- `LibraryBinary` should not contain any decompiled files, as we want
  FIR symbols in tests to be provided from indexed stubs or class files,
  but definitely not from decompiled PSI. This brings `LibraryBinary`
  much closer to the behavior of binary libraries in the IDE.
- Some tests may still require access to a decompiled file, for example
  when trying to test `getOrBuildFir` for some `KtElement` coming from a
  library. This commit introduces `LibraryBinaryDecompiled`, which
  does contain decompiled files.
- We don't really need `LibraryBinary` as a main test module kind
  anymore, since tests generally want to access some main `KtFile`.
  Hence, test configurators for `LibraryBinary` have been turned into
  configurators for `LibraryBinaryDecompiled`.
- An alternative would be decompiling files on demand, but this is not
  currently feasible because the Standalone API doesn't reconcile stubs
  with decompiled PSI, like the IDE does automatically. (For the same
  declaration, the stub and the PSI will have a different identity.) As
  long as there is no support for this, we'll have to rely on a separate
  test module kind.

^KT-65960
2024-02-26 21:57:23 +00:00
Pavel Kirpichenkov 1c1bdae973 [Tests] Add tests for additional stub info in .knm files
KTIJ-28668
2024-02-26 10:18:38 +00:00
Jaebaek Seo 171ea3571c K2: Use deserialized type annotation for lambda type resolution.
This commit adds code to check whether a deserialized cone type is a
special function type kind or not when resolving the type of a lambda
expression (anonymous function). If it is a special function kind, it
sets the type of lambda based on the special function kind.

^KT-64994 Fixed
2024-02-25 10:10:43 +00:00
Jaebaek Seo 512efb9649 K2: Support binary library dependencies between test modules
The test infrastructure for analysis supports binary module tests, but
the binary build does not use another binary module as a dependency when
it passes the class path. As a result, each binary module build does not
work when they have dependency on each other.

This commit fixes the issue by
1. Topological sort in the order of dependency graph for test modules.
2. Pass module paths as extra class paths when they have dependency on
   each other.

^KT-64994
2024-02-25 10:10:43 +00:00
Andrey Yastrebov 9d30fb1b1c KT-65741 Fix SIR visitor parameter name & fix typo 2024-02-22 18:46:01 +00:00
Dmitriy Novozhilov 166c88b87c [Build] Add missing runtime dependency for AA Native tests generator 2024-02-21 10:12:07 +00:00
Ilya Chernikov 0d3964f22e Test, scripting: add infra for script tests with customizable def
based on the regular compiler tests infrastructure, but adding
directives that can customize the definition from testdata.
So far only default imports and provided properties are supported, but
the infrastructure is easily extendable to other customizations.
Another limitations that provided properties are not supported for
the black box tests - the constructor parameters computing code
should be adapted to support it.
Note: in order to pick up the customized definition, the script files
should have an extension .test.kts
2024-02-21 07:47:15 +00:00
Dmitrii Gridin 072d191306 [compiler] replace Enum values() with entries
To fix warnings. Also, use of `Enum.entries` may improve the performance

^KT-48872
2024-02-20 17:56:46 +00:00
Dmitriy Novozhilov d9beae0556 [Test] Change indent from four to two spaces in generated tests
This is needed to reduce the size of generated test files, which started
  to exceed default IDE limit
2024-02-16 12:48:24 +00:00
Dmitriy Novozhilov 9b5a9ccba8 [Test] Don't generate throws Exception on methods of generated tests
This is needed to reduce the size of generated test files, which started
 to exceed default IDE limit
Also update some (mostly old) test utilities to remove exceptions from
 java signatures
2024-02-16 12:48:24 +00:00
Vladimir Sukharev bf0150108d [K/N][Tests] Move filecheck and cinterop tests to /native/
^KT-61259
2024-02-14 23:36:34 +00:00
Dmitrii Gridin 898c8c002e [LL FIR] add lazy body calculation tests for scripts
After KT-65344 we can effectively calculate lazy bodies in scripts,
so we can safely add the test

^KT-62840
2024-02-14 16:16:01 +00:00
Nikolay Lunyak 389f02b016 [FIR] Let FirErrorExpression have a working type if possible
^KT-65337 Fixed
2024-02-14 09:57:12 +00:00
Artem Olkov b6c805bbb6 Remove KotlinSirOrigin hierarchy in favour of direct AA usage #KT-65335 Fixed
Merge-request: KT-MR-14229
Merged-by: Artem Olkov <artem.olkov@jetbrains.com>
2024-02-09 18:34:52 +00:00
Ilya Goncharov 12cd9c4530 [Gradle, JS] Deprecate only deprecated properties in compiler arguments copy 2024-02-09 18:20:08 +00:00
Ilya Goncharov 2340d59f40 [JS] Get rid of outputFile in compiler args (KT-61116)
^KT-56753 fixed
2024-02-09 18:20:08 +00:00
Brian Norman 305c53dd6e [PowerAssert] Add codegen tests 2024-02-07 21:51:17 +00:00
Yan Zhulanow 3cd04a9e9e [Analysis API] Migrate existing code fragment tests to the new API 2024-01-30 11:41:26 +00:00
Artem Kobzar 8c69ffe8c9 [K/Wasm] Generate wasm-specific unsigned implementations ^KT-58039 Fixed 2024-01-29 20:11:41 +00:00
strangepleasures 17955ce7d9 Revert "Remove flaky Kapt4ToolIntegrationTestGenerated test"
This reverts commit 58fd558308.
2024-01-29 15:47:36 +00:00
Artem Olkov de6a27aeeb KT-65123: move Swift Export Compiler Plugin into swift-export-standalone module
Merge-request: KT-MR-14031
Merged-by: Artem Olkov <artem.olkov@jetbrains.com>
2024-01-29 10:32:09 +00:00
Igor Yakovlev 3e9b2573c5 [Wasm/std] Fix invalid sign for FP rem operator
Fixed #KT-64829
2024-01-24 15:40:48 +00:00
Vladimir Sukharev 39e2187d31 [K/N][Tests] Split filecheck part from test direct.kt
^KT-61259
2024-01-19 18:31:25 +01:00
Ilya Chernikov d6c9a492ad K2 Scripting: disable K2 lightTree-based script tests
they were enabled by mistake and do not work properly until
LT parsing is implemented
depends on #KT-60127
2024-01-19 15:54:54 +00:00
Nikolay Krasko 58fd558308 Remove flaky Kapt4ToolIntegrationTestGenerated test
The test is now very flaky and leads to java.lang.OutOfMemoryError

KTI-1559
2024-01-19 14:01:02 +00:00
Yan Zhulanow 9021fdaf83 [Analysis API] Remove obsolete dependentCopy tests 2024-01-18 17:12:28 +00:00
Yan Zhulanow 74db837b7d [Analysis API] Remove obsolete on-air resolution tests 2024-01-18 17:12:28 +00:00
Dmitrii Gridin 6145255e2c [Analysis API test] extract AbstractPsiDeclarationProviderTest
^KT-64805
2024-01-10 22:07:03 +00:00
Dmitrii Gridin 0f3f0ff080 [Analysis API test] rename AbstractPsiDeclarationProviderMultiModuleBinaryTest to AbstractPsiDeclarationProviderBinaryTest
^KT-64805
2024-01-10 22:07:03 +00:00
Dmitrii Gridin 79a8b6de1f [Analysis API test] rename AbstractPsiDeclarationProviderSingleModuleTest to AbstractPsiDeclarationProviderSourceTest
^KT-64805
2024-01-10 22:07:03 +00:00
Ilya Kirillov d5b59c48c2 [Analysis API] fix "Cannot compute containing PSI for unknown source kind 'org.jetbrains.kotlin.KtFakeSourceElementKind$DefaultAccessor'" exception on getContainingSymbol call for default setter parameter
^KT-64825 fixed
2024-01-08 20:06:20 +00:00
Yan Zhulanow 9c91158be6 [Analysis API] Add tests for dangling files 2024-01-05 16:04:14 +00:00
Alexander Udalov e4a608c6e7 Kapt: remove tests on old JVM backend
#KT-64680
2024-01-03 19:37:40 +00:00
Dmitrii Gridin b6f0571f0b [LL FIR] introduce lazy resolution tests for fake overrides
^KT-64243
2023-12-19 16:21:57 +00:00
Jinseong Jeon 10c9b81c79 AA standalone: introduce multi-module binary dependency test 2023-12-19 07:03:29 +00:00
Jinseong Jeon 3fbc16af62 AA standalone: repackage test configurators
...before introducing a new test configurator for binary dependency
2023-12-19 07:03:28 +00:00
Jinseong Jeon 0832158017 AA standalone: rename previous test to include SingleModule
...before introducing multi-module / binary dependency tests
2023-12-19 07:03:28 +00:00
Vladimir Sukharev c09e8909d4 [K/N] Move cinterop tests from standalone to codegen/box
^KT-61259
2023-12-18 18:04:27 +00:00
Roman Golyshev 146d93a044 KT-64205 [AA] Rearrange testData for reference shortener
Get rid of `referenceShortener/referenceShortener` nested directory
2023-12-15 10:49:24 +00:00
Ilya Chernikov d83027720d minor: K2 IC tests: rename incremental FirIC tests for consistency 2023-12-13 13:40:44 +00:00
Ilya Chernikov a295a34d77 K2 IC tests: reenable incremental tests with PSI
#KT-64228 fixed
2023-12-13 13:40:44 +00:00
Artem Olkov 5fcdd4a9f6 KT-63748: Pack Swift Export Frontend into compiler plugin
Co-authored-by: Sergej Jaskiewicz <jaskiewiczs@icloud.com>


Merge-request: KT-MR-13351
Merged-by: Artem Olkov <artem.olkov@jetbrains.com>
2023-12-13 10:40:38 +00:00
Marco Pennekamp ae5a053025 [LL] Disable modifiable PSI tests due to application sharing issues
^KT-63650
2023-12-13 10:29:11 +00:00
Sergej Jaskiewicz f844a86057 [utils] Introduce the bind function and use it throughout 2023-12-13 10:04:45 +00:00
Sergej Jaskiewicz cab87eba21 [SIR, FIR generators] Add KDocs for visitor-related methods of elements 2023-12-12 14:27:57 +00:00
Sergej Jaskiewicz 1bed6a063f [SIR] Add SirTransformerVoid class
This is convenient for cases when the transformer has no context to pass
to each method
2023-12-12 14:27:57 +00:00
Sergej Jaskiewicz 80847b9ee2 [SIR generator] Add SirVisitorVoid class
This is convenient for cases when the visitor has no context to pass to
each method
2023-12-12 14:27:57 +00:00
Sergej Jaskiewicz 80c9eae409 [tree generators] Factor out common transformer printing logic 2023-12-12 14:27:57 +00:00
Sergej Jaskiewicz 0d2032f3ef [SIR] Auto-generate the Swift IR tree
Co-authored-by: Gleb Lukianets <gleb.lukianets@jetbrains.com>
2023-12-08 10:09:09 +00:00
Sergej Jaskiewicz 39c84bca06 [tree generators] Add a method for configuring all leaf builders
It will be used in the new Swift IR tree that will be added in the next
commit.
2023-12-08 10:09:09 +00:00