Commit Graph

727 Commits

Author SHA1 Message Date
Sergej Jaskiewicz 904f8706ee [K/N] Don't use reflection in irText tests for obtaining manglers
See KT-61248
2023-09-13 14:25:12 +00:00
Anastasia.Nekrasova eab6e9bb36 Added tests for all code samples from KT-60523, except 2.3.
Test for 2.3 sample must be added in the context of KT-61792.
2023-09-12 07:03:20 +00:00
Alexander Shabalin 2f22b0a6b0 [K/N] Migrate runtime/atomics tests to new testing infra ^KT-61259 2023-09-09 07:25:35 +00:00
Mikhail Glukhikh 20cb075e56 K2: fix calculating property reference type in delegated setter
This commit is an accidentally forgotten part of the KT-61045 fix
#KT-61720 Fixed
2023-09-08 15:35:10 +00:00
Alexander Shabalin ce371df5f6 [K/N] Set 2 minute timeout for StdlibTest 2023-09-08 14:01:43 +00:00
Alexander Shabalin ff88c76e3c [K/N] Parse duration for EXECUTION_TIMEOUT 2023-09-08 14:01:43 +00:00
Johan Bay a1c2ded8a3 [K/N] Header klibs: Keep private properties in value classes
^KT-61767 Fixed
2023-09-08 13:13:19 +00:00
Denis.Zharkov 034671ad78 K2: Update substituted member candidate if it contains type variables
See the comment at updateSubstitutedMemberIfReceiverContainsTypeVariable

It became necessary after delegate inference is rewritten, since before
that happened, stub types were being left there and FIR2IR handled
them accidentally properly because stub types are equal to anything.

But that wasn't really correct even there because stub types are not
intended to leak out of the FIR

^KT-61060
2023-09-08 07:11:48 +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
Vladimir Sukharev f14b48a4b0 [K/N] Don't use KonanIrModuleFragmentImpl in irText test pipeline
^KT-58240
2023-09-05 15:33:25 +00:00
Vladimir Sukharev 3aa6c9e74d [K/N] Run irText tests for K1/Native
^KT-58240
2023-09-05 11:42:45 +00:00
Ivan Kylchik abc061e17f [IR] Restore and fix ifConstVal test
It was accidentally dropped after KT-55196 fix.
2023-09-05 11:06:43 +00:00
Alexander Shabalin 9ab6a5ff56 [K/N] Migrate all stdlib_external tests to new testing infra ^KT-61259
- Move backend.native/tests/stdlib_external to runtime/test This mirrors
  tests location (in relation to sources) on other backends.
- Remove all backend.native/tests tasks using stdlib_external.
  Additionally remove now unused KonanGTest.
- Include complete native-wasm/test and runtime/test in
  native/native.test
- In runtime/test/numbers/MathTest.kt leave only native-specific part.
2023-09-04 18:51:10 +00:00
Alexander Shabalin cb25ef80a9 [K/N] Reenable disabled FirStdlibTest 2023-09-01 14:45:05 +00:00
Alexander Shabalin bd797ed503 [K/N] Run stdlib tests only in normal mode ^KT-61259 2023-08-30 17:34:34 +00:00
Ivan Kochurkin c8c25d8b98 [FIR] Fix resolving of overload function with expect and common candidates
^KT-58896 Fixed
2023-08-30 15:58:59 +00:00
Johan Bay 0a612e4268 [klib] Add an option to write out header klibs
The header klib is supposed to only contain the public abi of the module
similar to jvm-abi-gen. It is intended to be used as a dependency for other
klib compilations instead of the full klib for compilation avoidance.

^KT-60807
2023-08-29 13:25:07 +00:00
Stanislav Ruban 44a4c4ee1c [tests] BI (1P&1TV/1TIO): add tests for target types
single builder parameter
single postponed type variable
single origin of type information

relevant issues:
KT-60719
KT-60720
KT-60855
KT-60877
KT-60880
2023-08-25 14:01:56 +00:00
Ilya Chernikov b821009617 K2: add missing checks for integral parameter type on implicit coercion
#KT-61418 fixed
#KT-61442 fixed
#KT-61441 fixed
2023-08-25 08:55:58 +00:00
Svyatoslav Scherbina 0a2348e595 Native: add debugger test for inspecting string variables
We just had no tests checking that debugger can properly show values
of string-typed variables. This commit adds such a test.
2023-08-24 15:03:27 +00:00
Pavel Kunyavskiy eefc51657a [K/N] Fix debug info for lambdas inside inline functions
^KT-57365
2023-08-23 08:18:56 +00:00
mvicsokolova 76a1091820 [K/N]: Do not require JDK11 for :native:native.tests
This commit provides a small fix in the code of a native test runner so that JDK11 is not required and removes the JDK11 target for the atomicfu-compiler-plugin.

Fixes KT-61293

Merge-request: KT-MR-11757
Merged-by: Maria Sokolova <maria.sokolova@jetbrains.com>
2023-08-22 13:32:38 +00:00
Roman Efremov 8aa3ccd342 [FIR] Store matched actual class members inside FIR attribute
Currently, there is only attribute `ExpectForActualAttributeKey`
where mapping is stored only for source declarations with `actual`
modifier. But we need mapping of all class members, including classes
which were actualized via `actual typealias` or fake override members.
This data will be needed for the annotation checker in subsequent
commits.

^KT-60668
^KT-60936
2023-08-22 12:14:42 +00:00
Kirill Rakhman fa77e3952d [FIR] Bring equivalent call behavior closer to K1
#KT-61159 Fixed
2023-08-21 12:11:58 +00:00
Igor Chevdar 7c67e9e08b [tests][lldb] Added a reproducer for #KT-61131 2023-08-21 12:05:28 +00:00
Igor Chevdar c1874d0184 [K/N][codegen] Added debug info to virtual functions trampolines
#KT-61131 Fixed
2023-08-21 12:05:28 +00:00
Nikolay Lunyak 73b4a81663 [FIR] Forbid complex boolean expressions
Disabling the language feature is supported,
otherwise there are too many tests that
would need to be updated to account for
K2's inability to do it.

The `ifConstVal.kt` test is deleted,
because now it must also be ignored in K2,
and since it is ignored for both the
frontends, and the ignored backends
include all the target backends, this test
is basically unused.

Note that now both the frontends report
`CONST_VAL_WITH_NON_CONST_INITIALIZER`.
for `condition`.

^KT-55196 Fixed
2023-08-18 15:16:13 +00:00
Kirill Rakhman 79fe48ab5b [FIR2IR] Support error qualifier in case of error suppression
#KT-60536 Fixed
2023-08-18 14:28:56 +00:00
Ivan Kochurkin 553114e245 [K2, MPP] Actualize annotation calls
^KT-57963 Fixed
2023-08-17 14:04:59 +00:00
Dmitriy Dolovov d691ab61d7 [KLIB] Keep "API for KLIB ABI" test data under "compiler/testData/klib/" dir
The test data is used both in ":kotlin-util-klib-abi" and
":native:native.tests" modules. It's better to keep it together with
the test data for other KLIB tests which are also used in more than one
module, i.e. in "compiler/testData/klib/" dir.
2023-08-16 19:11:35 +00:00
Dmitriy Dolovov cb92990ed6 [KLIB][tests] Reorganize "klib dump-metadata" tests
- Keep the test data under "native/native.tests/testData/klib/" dir
- Rename tests from "klib contents" to "klib dump-metadata"
2023-08-16 19:11:35 +00:00
Dmitriy Dolovov ec9370c30b [KLIB][tests] Reorganize "klib dump-ir" tests
- Keep the test data under "native/native.tests/testData/klib/" dir
- Rename tests from "klib ir" to "klib dump-ir"
2023-08-16 19:11:35 +00:00
Dmitriy Dolovov 60b950b9bd [KLIB][tests] Keep "klib evolution" test data under "testData/klib/" dir 2023-08-16 19:11:34 +00:00
Dmitriy Dolovov 5c3e63e19a [PL][tests] Keep PL test data under "testData/klib/" dir 2023-08-16 19:11:34 +00:00
mvicsokolova 9ff0e0b046 [atomicfu-K/N] Tests for K/N atomicfu-compiler-plugin
* `nativeTest` task now allows to provide compiler plugins that may be enabled during test compilation
* test sets for JVM and K/N backends are equal

KT-60800 describes all the issues with native tests that were solved in this commit.

Co-authored-by: Dmitriy Dolovov <Dmitriy.Dolovov@jetbrains.com>

Merge-request: KT-MR-11401
Merged-by: Maria Sokolova <maria.sokolova@jetbrains.com>
2023-08-16 09:41:29 +00:00
Vladimir Sukharev 8f03eb9314 [K/N] Fix stdlib import in DiagnosticsNativeTests
Merge-request: KT-MR-11635
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-08-16 08:27:16 +00:00
Alexander Korepanov 7a31167e0b [Common IR] Do not add internal methods to overrides
[JS IR] Use a module name in JsFunctionSignature for internal methods

^KT-60635 Fixed
2023-08-09 16:35:59 +00:00
Dmitriy Dolovov da2e6d93ff [Native][tests] Don't use trove4j in K/N new test infra 2023-08-09 12:15:39 +00:00
Dmitriy Novozhilov 4e3dbcada3 [FIR2IR] Always look for already generated fake overrides before creating them
This change covers the case where some f/o was generated in common module
  and it is referenced in platform code. But signature of this f/o may be
  different in different modules because of e.g. actualization of value
  parameters with actual typealias

^KT-60850 Fixed
2023-08-09 09:40:23 +00:00
marat.akhin ae4fab8483 [KMP] Allow matching expect ctorless final classes to objects
both directly and via typealias.

This is a possible fix to KT-59747
2023-08-08 23:18:35 +00:00
Igor Chevdar 9a719066e3 [K/N][tests] Added a reproducer for #KT-60371 2023-08-08 10:10:47 +00:00
Igor Chevdar 2f463f740f [K/N][tests] Fixed CachesAutoBuildTest & IncrementalCompilationTest
In auto-cache mode, the compiler itself chooses the system cache directory,
and it is important to not pass it explicitly.
2023-08-08 10:10:47 +00:00
Dmitriy Novozhilov cc2bc5e8b1 [FIR2IR] Reuse IR fake overrides for FIR fake overrides for all MPP modules
^KT-58229 Fixed
2023-08-03 10:02:57 +00:00
Zalim Bashorov cac5342add Generate tests 2023-08-01 23:48:24 +02:00
Dmitriy Dolovov 748eb2f9ee [KLIB] ABI reader: Tests for classes inherited from classes produced by Native interop tool
^KT-54402
2023-07-31 20:22:21 +00:00
Dmitriy Dolovov ac3c000ab1 [KLIB] Native K1 & K2 tests for dumping KLIB ABI
^KT-54402
2023-07-31 20:22:20 +00:00
Dmitriy Dolovov ca00c38fca [Native][tests] Use common test tag "klib" for all KLIB-related tests 2023-07-31 20:22:20 +00:00
mvicsokolova bed16f92b1 [atomicfu-K/N]: Support Native backend in atomicfu compiler plugin
Atomicfu compiler plugin supported transformations for K/N:
* atomic properties are replaced with volatile properties and all the operations are delegated to native atomic intrinsics
* atomic arrays are replaced with kotlin.concurrent.Atomic*Arrays
* all other features available on JVM are covered as well (custom atomic extensions, delegated properties, debug tracing)

See (KT-58358, https://github.com/Kotlin/kotlinx-atomicfu/issues/261)

Merge-request: KT-MR-11253
Merged-by: Maria Sokolova <maria.sokolova@jetbrains.com>
2023-07-31 14:48:28 +00:00
Johan Bay fafea27283 [klib tool] Add option to print ir
Dumping the IR from a klib is useful for debugging klib compilations.

^KT-58877
2023-07-31 09:45:19 +00:00