Svyatoslav Scherbina
1b131332ab
[Native][tests] Simplify handling opt-ins in the test launcher
...
For a box test, the test engine generates a test launcher -- a function
that calls `box` function. The latter might require an opt-in. To deal
with this, the test engine was using some heuristics to detect possibly
used opt-ins and applied them to the test launcher.
This commit provides an alternative solution -- it uses
`@Suppress("OPT_IN_USAGE_ERROR")` annotation for the test launcher. This
way, it doesn't have to guess which opt-ins to apply.
2022-08-01 15:24:15 +02:00
Svyatoslav Scherbina
09c131afd2
[Native][tests] Add standalone test for KClass package names
...
To ensure that after introducing `ReflectionPackageName` annotation,
we still have tests that check KClass package names without it.
2022-08-01 15:24:15 +02:00
Svyatoslav Scherbina
c1853a0218
[Native][tests] Introduce NATIVE_STANDALONE directive
...
This directive makes the test standalone, i.e. disables grouping it with
other tests into a single compilation, and in particular disables
package renaming for the test.
Also, remove the old hard-coded way to mark tests standalone.
2022-08-01 15:24:10 +02:00
Svyatoslav Scherbina
d50b0693b2
[Native][tests] Don't make typeOf tests standalone
...
The test engine detected tests using typeOf and made them "standalone",
i.e. disabled test grouping and thus package renaming for them, to keep
the reflection information intact.
Now, with `ReflectionPackageName` annotation, this is not required
anymore.
2022-08-01 15:23:38 +02:00
Svyatoslav Scherbina
cee0731cef
[Native][tests] Keep reflection package name when renaming packages
...
The test engine renames packages in test files to allow group many tests
into single compilation for performance reasons.
As a result, reflection APIs return different package names. To deal
with this, the test engine uses certain heuristics to detect tests using
reflection APIs, and disables grouping (and thus package renaming) for
them.
This commit provides an alternative solution for the same problem --
now the test engine instructs the compiler to use original package names
for reflection information, by means of the introduced
`ReflectionPackageName` annotation.
2022-08-01 15:23:32 +02:00
Svyatoslav Scherbina
38723816b7
[Native][tests] Fix file annotation patching in test files
...
Previously, the test engine was copying @file:OptIn annotations from
each file to all the other files inside the same test data, and also was
removing other file annotations in certain cases.
Now it only adds the opt-ins specified with `!OPT_IN` directives, and
doesn't remove anything.
2022-08-01 15:23:19 +02:00
Mads Ager
e46540729c
Fix equality for generated test files.
...
They were compared based on the name of the file only disregarding
the module. Therefore, the test framework would only patch
package declarations for one file with a given name even if there
were multiple files with that name in different packages.
2022-08-01 08:57:17 +00:00
Steven Schäfer
6f0ff6aeb0
IR: Fix scope transparency in ReturnableBlockLowering
...
An IrReturnableBlock introduces a new variable scope and shouldn't be
replaced with a transparent IrComposite block.
2022-07-29 01:06:44 +02:00
Igor Chevdar
8981eb85de
[box-tests] Added a couple of reproducers for KT-52795
2022-07-28 16:01:17 +00:00
Dmitriy Dolovov
b210e24b43
[Native][tests] Temporarily disable String codegen/box tests with "-opt" mode
2022-07-27 22:39:34 +00:00
Dmitriy Dolovov
5d234c0cdc
[Native][tests] Ability to programmatically mute codegen/box & regular tests
2022-07-27 22:39:33 +00:00
Ilya Gorbunov
1addc23b23
Add range iteration tests for rangeUntil
...
#KT-52932
2022-07-26 23:52:10 +00:00
Rick Clephas
5a5e6ad8cd
[K/N] Add ObjCName annotation ( #4815 )
2022-07-23 18:58:06 +02:00
Dmitriy Dolovov
8adb0528d7
[Native][tests] Don't use non-default runtime assertions mode with cache
...
^KT-53032
2022-07-20 14:43:08 +00:00
Dmitriy Dolovov
7bc0132cca
[Native][tests] Don't fail tests on expected partial linkage warnings
2022-07-18 17:29:51 +02:00
Dmitriy Dolovov
66de825508
[Native][tests] Unmute klibABI/remove[Property|Function] tests
...
This reverts commit d60c93c1f8 .
2022-07-18 17:29:50 +02:00
Dmitriy Dolovov
8283537673
[Native][tests] Don't fail tests on partial linkage warnings
2022-07-18 17:29:50 +02:00
Dmitriy Dolovov
ce04a24b26
[IR][tests] Removal of class used as variable type and constructor call
2022-07-18 17:29:50 +02:00
Dmitriy Dolovov
d5ded97ccb
[IR][tests] Removal of inlined class case
...
^KT-52478
2022-07-18 17:29:50 +02:00
Dmitriy Dolovov
7b5e33b6ca
[IR][tests] Add tests for removal-of-typealias case
2022-07-18 17:29:49 +02:00
Dmitriy Dolovov
89a188d199
[IR][tests] Add tests for remove-inlined-callable member case
2022-07-18 17:29:49 +02:00
Dmitriy Dolovov
9c1c712057
[IR][tests] Add tests for removal-of-overridden open callable case
2022-07-18 17:29:49 +02:00
Steven Schäfer
8014712569
JVM IR: Check that we generate callable references in tests
2022-07-14 23:24:18 +02:00
Pavel Kunyavskiy
5cdda48487
[K/N] Extract const val initializers to place of usage
...
This would make behaviour more consistent with jvm. There is still
a difference in behaviour about point where side effects happen.
^KT-52970
2022-07-13 08:49:40 +00:00
Igor Chevdar
e36bd5fe90
[box-tests] Added a multi-module box test
2022-07-13 08:01:51 +00:00
Vladimir Sukharev
fd52f475cb
Devirtualization fails to eliminate boxing in function reference context
...
^KT-49847 Fixed
Merge-request: KT-MR-6460
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com >
2022-07-12 08:26:27 +00:00
Victor Petukhov
7d945d9bdc
[FIR] Support loading rxjava3 nullability annotations on bounded wildcards
...
^KT-53041 Fixed
2022-07-11 12:44:08 +00:00
Victor Petukhov
cb2dbca0c3
[FE 1.0] Support loading rxjava3 nullability annotations on bounded wildcards
...
^KT-53041 Fixed
2022-07-11 12:44:07 +00:00
Victor Petukhov
2057deb91b
[FE 1.0] Create DONT_CARE type only for callable references with no expected type
...
Otherwise, it can be resolved safety
^KT-52270 Fixed
2022-07-11 12:44:06 +00:00
Igor Chevdar
a61d05971e
[box-tests] Added a couple of multi-module box tests
2022-07-10 17:56:36 +00:00
Nikita Nazarov
7287be6879
Add tests on variable spilling with debug mode enabled
...
#KT-48678 Fixed
2022-07-07 14:51:24 +03:00
Nikolay Krasko
d080297c20
Revert "Add tests on variable spilling with debug mode enabled"
...
This reverts commit 65bb6abae4 .
2022-07-05 11:04:50 +00:00
Pavel Kunyavskiy
c1ec1d9d4c
[K/N] Handle Unit? and Nothing? correctly in finally transformation
...
^KT-52985
2022-07-05 06:54:29 +00:00
Nikita Nazarov
65bb6abae4
Add tests on variable spilling with debug mode enabled
...
#KT-48678 Fixed
2022-07-02 18:29:18 +03:00
Pavel Mikhailovskii
8a402bcacd
KT-52875 Fix extension function literal creation with -Xlambdas=indy
2022-06-30 14:13:05 +00:00
Ilmir Usmanov
a5084c2f69
JVM IR: Make receiver type of IrGetField not null
...
otherwise, it will be mapped to inline class type if underlying type
is primitive of nullable.
#KT-52913 Fixed
2022-06-30 01:28:09 +00:00
Ilmir Usmanov
09c9641e23
FE: Use safe call when searching for suspend modifier
...
The modifier does not exist, when the parameter type is typealias.
#KT-35187 Fixed
2022-06-29 06:12:44 +02:00
Pavel Mikhailovskii
c3c09aa95a
KT-4107 Data objects
2022-06-28 16:58:20 +02:00
Ilya Gorbunov
cd9b36b4c3
Introduce OpenEndRange and make primitive ranges implement it
...
#KT-52932
2022-06-28 00:08:03 +00:00
Ilmir Usmanov
f34ae686a0
JVM: Make coroutines spilling tests runtime
...
instead of bytecode text ones. Check the content of continuation
object instead of bytecode, since this is less prone to changes during
changes in coroutines codegen.
#KT-48678
2022-06-27 23:11:40 +02:00
Pavel Kunyavskiy
dfcf2cfa84
[K/N] Fix extracting local classes from lambda in cached inline function
...
^KT-52540
2022-06-27 14:09:27 +00:00
Aurimas
e2ac24cc90
Make sure to sort klib manifest data
...
Not sorting results in non reproducible output causing up-to-date check failures
2022-06-24 07:43:01 +00:00
Pavel Mikhailovskii
3766698081
KT-52743 IR: Fix null checks in Elvis operators
2022-06-22 09:11:24 +00:00
Dmitriy Novozhilov
b73783b693
Add test for KT-52580
2022-06-21 14:10:37 +00:00
Dmitriy Dolovov
d60c93c1f8
[Native][tests] Temporarily mute klibABI/remove[Property|Function] tests
2022-06-20 12:30:01 +04:00
Dmitriy Dolovov
c0cbd2e3ed
[Native][tests] Fail tests on unexpected non-syntax/semantic warnings
2022-06-20 12:30:01 +04:00
Yan Zhulanow
3a6dd52833
[Pill] Update imported modules
2022-06-16 18:31:49 +00:00
Alexander Shabalin
29f3445721
[K/N] Deprecated freezing ^KT-50541
...
Starting with 1.7.20 freezing is deprecated. See https://github.com/JetBrains/kotlin/blob/master/kotlin-native/NEW_MM.md#freezing-deprecation for details.
Merge-request: KT-MR-6399
Merged-by: Alexander Shabalin <Alexander.Shabalin@jetbrains.com >
2022-06-16 09:04:14 +00:00
Steven Schäfer
194a1d1c6a
JVM IR: Start fake variables for default lambdas after initialization
...
KT-52702
2022-06-15 16:49:22 +02:00
Sergey Bogolepov
f9d9dc58ff
[K/N] Cross-compilation of MIPS targets from macOS and Windows hosts
...
Fixes KT-52226
2022-06-15 14:37:20 +00:00