Commit Graph

1597 Commits

Author SHA1 Message Date
Sergej Jaskiewicz 2096d22e18 [IR] Mark IrBlockBodyImpl with an opt-in annotation
KT-59318
2023-12-19 16:20:02 +00:00
Sergej Jaskiewicz f482b6a458 [IR] Mark IrValueParameterImpl with an opt-in annotation
KT-59318
2023-12-19 16:20:02 +00:00
Marco Pennekamp 32fe29b8cc [Test] Add debug names to unnamed test disposables
- This helps to track down disposables which are never disposed, and
  reduces confusion when printing disposables in general (the names will
  now be meaningful, instead of endless lists of "newDisposable" and
  "TestDisposable").

^KT-64099
2023-12-19 11:12:23 +00:00
Ilya Gorbunov d2aae67e03 Replace kotlin-test project dependencies in the project
Use dependency helper function that chooses whether to take them
from the bootstrap repository or from a configuration of kotlin-test

KT-61969
2023-12-13 15:40:25 +00:00
Pavel Kunyavskiy e80d4b1d60 [IR] Move IrDeclaration.isExpect to IrUtils
^KT-62292
2023-11-20 08:31:41 +00:00
Vladimir Sukharev c38a0e10af [K/N] Implement a concept of conditional ignore of K/N blackbox tests
^KT-59288 Fixed
2023-11-15 19:03:07 +00:00
Alexander Udalov c1c9549b4f Tests: minor, remove obsolete deprecated AbstractBytecodeListingTest 2023-11-02 10:59:28 +00:00
Dmitriy Novozhilov fb8bf19091 [IR] Rename IrSymbolInternals to UnsafeDuringIrConstructionAPI
The new name more precisely describes the meaning of this opt-int
2023-10-25 11:32:46 +00:00
Ilya Goncharov a79324037d [JS] Fix JPS artifacts cordinates 2023-10-16 13:34:37 +00:00
Svyatoslav Kuzmich a10042f909 [Wasm] Add K2 checkers.wasm module (KT-56849)
Add first K2 checker ExternalInheritanceChecker to test the infra
2023-10-12 13:26:58 +00:00
Mikhail Glukhikh 072757cdde Test: convert IR source ranges test to the new infrastructure
Related to KT-59864, KT-60111, KT-59584
2023-10-10 13:38:51 +00:00
Alexander Udalov 5ff15f6847 CLI tests: fix incorrect order of replacing versions
The change 9de6df6104 caused tests `requireKotlinCompilerVersion{,K2}`
to fail once the compiler version was changed to 2.0.0-dev-*. The reason
is that when patch version is 0, compiler version is equal to the
language version (which is itself always equal to JvmMetadataVersion).
So if we're replacing JvmMetadataVersion first, we end up with
`$ABI_VERSION$-dev-...` in the output, which is incorrect.
2023-10-02 08:59:12 +00:00
Mikhail Glukhikh 156097fe17 Restore KotlinCompilerVersion.IS_PRE_RELEASE
This commit is a slightly modified revert of 4f29c113.
IS_PRE_RELEASE allows to make LATEST_STABLE version behave as
experimental when this flag is set to true.
The general goal is to prepare fix of KT-62058; after this commit
one can do it by changing IS_PRE_RELEASE flag to true.
The fix of KT-62058 is planned to be done during bootstrapping.
This preparation and the future fix are parts of umbrella KT-61951.
2023-09-21 20:09:25 +00:00
Mikhail Glukhikh d8b3dd683e Use FIR compiler properly in AbstractTopLevelMembersInvocationTest 2023-09-19 15:46:29 +00:00
Dmitriy Dolovov a2e148173d [JS] Don't produce metadata-only (IR-less) KLIBs in JS
The scenario when JS source code is shared between a few JS common
source sets is not supported in Kotlin Multiplatform.

^KT-61136
2023-09-18 17:58:43 +00:00
Kirill Rakhman e8731f3f31 [FIR] Use resolvedType instead of coneTypeOrNull in tests
#KT-61367
2023-09-14 10:03:02 +00:00
Alexander Korepanov be4f6beddb [JS Tests] Prepare JS tests for testing backend diagnostics
- Introducing a backend diagnostic handler.
 - Moving JS diagnostic tests from test-common to
   js.test to avoid circular module dependencies.

^KT-61886 Fixed
2023-09-13 12:19:15 +00:00
Alexander.Likhachev 6eaccc997f [Build] Fix the typo junit jupyter -> jupiter 2023-09-06 22:47:34 +00:00
Alexander.Likhachev 6f96be0b76 [Build] Get rid of the testApiJUnit5 method
#KTI-1349 In Progress
2023-09-06 22:47:34 +00:00
Alexander.Likhachev 7a1dc1f89b [Build] Do not add ij dependencies in testApiJUnit5
This is not needed since the dependencies are already declared as API dependencies in the relevant projects.
#KTI-1349 In Progress
2023-09-06 22:47:33 +00:00
Alexander.Likhachev 357d12fc8e [Build] Move JUnit dependencies into the version catalog
The `kotlin-test` dependencies are left untouched as changing them affects publications, thus these versions are independent from the used inside our build
#KTI-1349 In Progress
2023-09-06 22:47:33 +00:00
Dmitriy Novozhilov 2d334c4e71 [Test] Merge multiple abstract legacy test runners into a single one
There was only one real inheritor of AbstractFirBaseDiagnosticTest,
  so there is no need in the whole hierarchy of abstract test runners

Also AbstractFirOldFrontendLightClassesTest is not intended to check any
  diagnostics or CFG dumps, so this logic was removed (they still can be
  checked using non-legacy AbstractFirDiagnosticTest from the main test
  infrastructure)
2023-09-05 14:59:36 +00:00
Dmitrii Gridin c095b60fe8 [LL FIR] drop outdated LazyBodyIsNotTouchedTest
We have our own transformers and tests against compiler test data,
so separate test with compiler transformers is redundant
2023-09-04 12:37:12 +00:00
Aleksei.Cherepanov 68af705664 Add import tracker
This tracker reports import directives to IJ's JPS to track changes and detectwehen it is needed to adjust compilation scope.

#KT-44835 Fixed
2023-08-30 12:42:39 +00:00
Kirill Rakhman bb8a46c3a0 [Test] Parallelize test generation 2023-08-28 08:02:05 +00:00
Bogdan Mukvich 7b00323b89 [Build] Update guava
Fix some reports from "Show Vulnerable Dependencies"

^KTI-1342
2023-08-25 14:10:37 +00:00
Kirill Rakhman 9ec814b7ad [FIR] Replace FirExpression.typeRef.coneType (and variants) with FirExpression.coneType
#KT-59855
2023-08-24 07:54:56 +00:00
Dmitrii Gridin 51cc799204 [SLC] fix flaky test 2023-08-21 20:46:25 +00:00
Alexander Udalov 9de6df6104 Tests: improve logic of replacing versions with templates
To slightly reduce the number of test data that needs to be changed when
Kotlin switches to a new language version.
2023-08-18 10:49:48 +00:00
Dmitriy Dolovov 033bb385b9 [IR] Drop expectDescriptorToSymbol completely
^KT-61136
2023-08-16 19:17:17 +00:00
Dmitriy Novozhilov 697d0d5638 [IR] Mark IrSymbol.owner with OptIn annotation
^KT-60923 Fixed
2023-08-16 17:47:29 +00:00
Dmitriy Dolovov b7211c171f [IR][JS] Drop JsIrFileSerializer.expectDescriptorToSymbol parameter
^KT-61136
2023-08-14 15:20:28 +00:00
Dmitriy Dolovov 5991364028 [IR][JS] Drop JsIrFileSerializer.skipExpects parameter
^KT-61136
2023-08-14 15:20:28 +00:00
Dmitriy Dolovov 7dbfe4bfb1 [IR][tests] Fix MPP IR dump tests to not fail on missing expect declarations
Expect declarations do not survive serialization to KLIB. So they need to be explicitly filtered in order for tests that compare dumped IR before and after serialization to pass successfully.

^KT-61136
2023-08-12 07:03:29 +00:00
Alexander Udalov 54c7466074 Tests: add CompileKotlinAgainstCustomBinariesTest for K2
This is needed because after changing default language version to 2.0,
we still need to test many scenarios from this test in K1.

Move K1-specific tests to OldCompileKotlinAgainstCustomBinariesTest, and
K2-specific tests to FirCompileKotlinAgainstCustomBinariesTest.

Mute failing K2 tests via `muteForK2`. It will throw exception if the
muted test will suddenly start passing.
2023-08-09 23:58:51 +00:00
Ilya Gorbunov 69a87efdd9 js.tests: change paths to kotlin-stdlib-js.klib
Change the expected klib name of stdlib

KT-56106
2023-08-03 14:47:20 +00:00
Ilya Goncharov 1f9af4b452 [Gradle, JS] Fix cli tests for ir
KT-60495
2023-07-26 12:51:37 +00:00
Pavel Kunyavskiy d797505f06 [K/N] Drop merging forward and real declaration in deserializer
^KT-59643
2023-07-24 08:24:20 +00:00
Dmitriy Dolovov 938146749d [PL][tests] K/JS: Avoid any unexpected warnings to appear in tests 2023-07-17 21:09:40 +00:00
Dmitriy Dolovov 715aba3d18 [PL][tests] K/JS: Run compiler through CLI interface 2023-07-17 21:09:40 +00:00
Ivan Kylchik 076305bb78 [Test] Drop SMAPTestUtil.kt file
It is not used anywhere. Probably left after transition to new test
infrastructure.
2023-07-11 09:30:26 +00:00
Ilya Goncharov a6d461dbe8 [JS] Fix compile kotlin against custom binaries 2023-07-06 08:08:55 +00:00
Ilya Goncharov 148d8c9246 [Gradle, JS] Migrate JS cli tests to ir backend 2023-07-05 07:10:06 +00:00
Ilya Goncharov 08041230f0 [JS] Migrate checkers diagnostics test to IR backend 2023-07-04 18:04:14 +00:00
Kirill Rakhman 2cc588d6d8 [RAW FIR] Rename raw FIR builder types for clarity 2023-06-30 12:05:43 +00:00
Alexander Udalov cab53361f3 Use JVM IR backend in light analysis mode tests
Add some more filters on private/synthetic stuff (which doesn't matter
in practice) to make full and light analysis mode dumps as similar as
possible, so that all existing tests will pass for JVM IR. Unmute some
tests which were failing with the old JVM backend.

Tests on repeatable annotations are muted because in full analysis,
annotations are wrapped into the container (e.g. `@A(1) @A(2)` ->
`@A$Container(A(1), A(2))`), but they are no in the light analysis mode.
So there's always going to be a difference for these tests between full
and light analysis, unless we're going to change behavior of kapt, which
would be a kind of a breaking change.

 #KT-58497 Fixed
2023-06-22 17:10:51 +02:00
Alexander Udalov 6cce510319 Tests: tweak light analysis mode test filters
Do not compare private and synthetic methods between full and light
analysis modes, some private fields, and InnerClasses attributes. This
is needed to prepare these tests for migration to JVM IR.
2023-06-22 17:10:51 +02:00
Alexander Udalov 4ac6f01d31 Add ReplaceWithSupertypeAnonymousTypeTransformer to light analysis tests
To make these tests behave closer to kapt, since kapt is the primary use
case for the light analysis mode.

AbstractLightAnalysisModeTest compares the text dump of bytecode
obtained with full analysis and light analysis, removing things like
anonymous/synthetic entities. In the light analysis mode anonymous
objects in supertypes are always approximated, and in the full analysis
mode they are always present as is in signatures. So we're transforming
the text dump in the same way, by approximating anonymous objects in
signatures (more precisely, in return types of methods and fields) to
the supertype.
2023-06-22 17:10:51 +02:00
Dmitriy Dolovov 2e43fa7cd0 [PL][tests] Adapt tests for K/N to the conditions when static cache is used w/o lazy IR 2023-06-22 08:10:11 +00:00
Alexander Udalov 70e9245867 Revert "tmp: implement a hack to fix LA test"
This reverts commit 0387ce0365.

This change was not needed because the 'IGNORE_BACKEND_K1: JVM'
directive makes the test generated as ignored, in this case it is the
method named `ignoreSignedToUnsignedConversions` which is not even
recognized as a test.
2023-06-13 16:19:53 +00:00