Commit Graph

105 Commits

Author SHA1 Message Date
Vladimir Sukharev 524f0d335e [K/N][Tests] Migrate objcSmoke & objcTests tests
^KT-61259
2024-01-31 16:17:21 +00:00
Sergej Jaskiewicz 03aa14b473 [klib] Use "IR signatures" i/o "KLIB signatures" in diagnostics
We already use the term "IR signatures" in other places.
2024-01-30 20:47:09 +00:00
Sergej Jaskiewicz 6900e20096 [klib] Fix exception for clashing signatures from different modules
If we encounter a declaration in the current module whose signature
is the same as that of a declaration in another module which we happen
to also reference from the current module, don't report any errors,
just like we don't do it in Kotlin/JVM. This leaves the user in the KLIB
hell situation, but this is intentional, because otherwise a legitimate
change like moving a declaration to another module and marking
the original one as `@Deprecated("", level = DeprecationLevel.HIDDEN)`
would lead to a error, and we don't want that.

Also, don't try to show the diagnostics on a declaration that doesn't
have an IrFile.

^KT-65063 Fixed
2024-01-30 20:47:09 +00:00
Ivan Kylchik 69c83698fb [Native] Add K2 version of LLDB tests 2024-01-26 15:54:41 +00:00
Ivan Kylchik 2ded62c53e [Native] Drop LLDB_TRACE test directive
This directive doesn't have a lot of meaning. It is always set this
way that we are getting text file with the same name as test file.
2024-01-26 15:54:41 +00:00
Vladimir Sukharev 2f3705f0eb [K/N][Tests] Move funptr.kt to standalone tests due to OUTPUT_DATA_FILE directive
^KT-61259
2024-01-22 12:29:57 +00:00
Vladimir Sukharev 447c0fb618 [K/N][Tests] Migrate kt56048 test
^KT-61259
2024-01-19 18:22:21 +01:00
Vladimir Sukharev 48df87f635 [K/N][Tests] Migrate two more cinterop tests
^KT-61259
2024-01-17 08:33:41 +00:00
Vladimir Sukharev 80cf88c9b9 [K/N][Tests] Move threadStates tests to common codegen/box folder
^KT-61259
2024-01-16 20:15:25 +00:00
Vladimir Sukharev 5f51f5e1fc [K/N] Migrate more cinterop tests
^KT-61259
2024-01-16 11:58:31 +00:00
Sergey Bogolepov c165171471 [Native][tests] Port KT-36639 test case to the new infra 2024-01-15 11:18:28 +00:00
Sergey Bogolepov 1c24f994db [Native][tests] Initial support for CExport in the new test infra
Very trivial implementation of CExport test infrastructure based on
work from LLDB tests and ObjCExport tests.
2024-01-15 11:18:28 +00:00
Sergej Jaskiewicz eda30ff704 [klib] Implement diagnostics for clashing KLIB signatures
Now, we detect clashing signatures during serialization to KLIB and
report a compiler error if two or more declarations have the same
`IdSignature`

For example, for the following code:
```kotlin
@Deprecated("", level = DeprecationLevel.HIDDEN)
fun foo(): String = ""

fun foo(): Int = 0
```

the compiler will produce this diagnostic:
```
e: main.kt:1:1 Platform declaration clash: The following declarations
       have the same KLIB signature (/foo|foo(){}[0]):
    fun foo(): String defined in root package
    fun foo(): Int defined in root package
e: main.kt:4:1 Platform declaration clash: The following declarations
       have the same KLIB signature (/foo|foo(){}[0]):
    fun foo(): String defined in root package
    fun foo(): Int defined in root package
```

Note that we report this diagnostic during serialization and not earlier
(e.g., in fir2ir) for more robustness, so ensure that we check
exactly the signatures that will be written to a KLIB.
If we later introduce some annotation for customizing a declaration's
signature (e.g., for preserving binary compatibility), this
diagnostic will continue to work as expected.

^KT-63670 Fixed
2024-01-12 15:59:28 +00:00
Alexander Shabalin b7fbfb2fde [K/N][tests] Migrate first platform-dependent test to new testing infra
^KT-61259
2024-01-12 00:47:31 +01:00
Vladimir Sukharev 55a78bf499 [K/N][Tests] Migrate testData of KT59030WorkaroundTest to new new test infra 2024-01-11 23:30:06 +00:00
Vladimir Sukharev fee2a20a55 [K/N][Tests] Support test directive ASSERTIONS_MODE
^KT-64844 Fixed
2024-01-10 23:31:00 +00:00
Vladimir Sukharev 55bff799a8 [K/N][tests] Split tests for Any.collectReferenceFieldValues
^KT-61259
2024-01-04 18:24:37 +00:00
Vladimir Sukharev d972fec13c [K/N][tests] Move tests into better places
^KT-61259
2024-01-04 18:24:37 +00:00
Vladimir Sukharev e68bd1f04f [K/N][tests] Adjust moved tests to new testing infra
^KT-61259
2024-01-04 18:24:37 +00:00
Vladimir Sukharev 0a0da76a56 [K/N][tests] Move some more native tests to new testing infra
^KT-61259
2024-01-04 18:24:37 +00:00
Vladimir Sukharev 5728b34733 [K/N][Tests] Ignore test klibName on LInux with caches
^KT-61259
2024-01-02 18:47:05 +00:00
Alexander Shabalin d6a922bc74 [K/N][tests] Migrate link tests to new testing infra ^KT-61259 2024-01-02 18:47:05 +00:00
Igor Chevdar 94b35570ed [K/N][tests] Added some tests on multi-module file initialization 2023-12-28 12:13:24 +00:00
Igor Chevdar 519c15419f [K/N] Fixed a problem with dependencies
-Xinclude-library should be treated exactly as source files -
the final binary should depend on all of them.

 #KT-64408 Fixed
2023-12-28 12:13:24 +00:00
Igor Chevdar c35e026259 [K/N][tests] Moved several tests to proper location 2023-12-28 12:13:24 +00:00
Alexander Shabalin 0692346715 [K/N][tests] Fix new line handling in termination tests ^KT-61259 2023-12-21 14:55:21 +00:00
Alexander Shabalin 04a2a2d90d [K/N][tests] Migrate termination runtime tests to new testing infra ^KT-61259 2023-12-20 18:24:06 +00:00
Vladimir Sukharev bb8a7b6795 [K/N][Tests] Adjust moved tests interfaceCallsNCasts..vector to new infra
^KT-61259
2023-12-20 07:07:27 +00:00
Vladimir Sukharev 93642020ff [K/N][Tests] Move codegen test sources interfaceCallsNCasts..vector
^KT-61259
2023-12-20 07:07:27 +00:00
Vladimir Sukharev 73032213f0 [K/N][Tests] Adjust moved codegen tests to new infra
^KT-61259
2023-12-19 10:57:24 +00:00
Vladimir Sukharev 71a834b778 [K/N][Tests] Move codegen test sources cycles..innerClass
^KT-61259
2023-12-19 10:57:24 +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
Vladimir Sukharev 0b0ba3160f [K/N] Treat DEF files as regular test source, compiled with cinterop
^KT-61259
2023-12-18 18:04:27 +00:00
Vladimir Sukharev df2dcccbf7 [Tests] Removed moved tests from old testing
^KT-64256 Fixed
2023-12-18 11:15:15 +00:00
Vladimir Sukharev e15068c62f [K/N][Tests] Adjust moved codegen tests to new infra
^KT-61259
2023-12-18 11:15:15 +00:00
Vladimir Sukharev a5f3d5b737 [K/N][Tests] Move some codegen tests to new infra: annotations..coroutines
^KT-61259
2023-12-18 11:15:15 +00:00
Svyatoslav Scherbina 2cdf8cd7b1 Native: support Objective-C instancetype in more cases in cinterop
Objective-C has a special type, "instancetype". Generally, it is a type
that matches the method receiver type. So, if `Foo.foo` method returns
`instancetype`, then `Foo.foo()` would be of type `Foo`, while
`Bar.foo()` would be of type `Bar` (where `Bar` is a subclass of `Foo`).

Surprisingly, `instancetype` can be used not only as a return type, but
also somewhere inside a return type. cinterop wasn't ready for this.

This commit expands implementation of `instancetype` in cinterop to
cover more cases.

^KT-59597 Fixed
2023-12-14 08:57:29 +00:00
Vladimir Sukharev a59742258e [K/N] Speedup test CInterop/executable/bitfields/ 2023-12-13 19:06:57 +00:00
Dmitriy Dolovov c9f4a1a841 IR: Avoid overwriting of property signature descriptions
^KT-64085
^KT-64082
2023-12-07 15:02:24 +00:00
Vladimir Sukharev c5248fc5f4 [K/N] Migrate some cinterop tests to new test infra 2023-12-04 08:43:28 +00:00
Alexander Shabalin 340103098f [K/N][tests] Migrate entry point runtime tests to new testing infra ^KT-61259 2023-12-01 12:07:25 +00:00
Alexander Shabalin 6ca8f546fe [K/N][tests] Migrate console runtime tests to new testing infra ^KT-61259 2023-11-29 16:22:28 +00:00
Vladimir Sukharev 1b1df9f0db [K/N] Create test model for building/executing C-Interop tests
^KT-63287 Fixed
2023-11-14 19:35:52 +00:00
Svyatoslav Scherbina 8d20d5b16c Native: support objcExportReportNameCollisions=true binary option
This binary option makes the compiler emit a warning whenever it mangles
a name emitted by ObjCExport.

^KT-63153 Fixed
2023-11-14 19:24:43 +00:00
Vladimir Sukharev 3ea4a6a937 [K/N] Add test for KT-63048, K1greenK2red
^KT-63048
2023-11-07 18:51:10 +00:00
Dmitriy Dolovov a3bfe58415 [KLIB tool] Fix failing test on dumping c-interop signatures 2023-11-02 18:44:14 +00:00
Dmitriy Dolovov e18a2d0a2e [KLIB tool] Add tests for dumping metadata signatures 2023-10-27 09:28:00 +00:00
Dmitriy Dolovov 88a297b022 [KLIB tool] Run tests for 'dump-metadata' with & without signatures 2023-10-27 09:28:00 +00:00
Dmitriy Dolovov aa9b901926 [KLIB tool] Migrate 'dump-metadata' tests to K/N test infra 2023-10-27 09:28:00 +00:00
Dmitriy Dolovov 93506bcb95 [KLIB tool] Add tests for dumping IR signatures
^KT-62341
2023-10-27 09:27:59 +00:00