Open
Description
In "normal" cases Kotlin function names map directly onto Java method names.
However, there are a few cases where the Kotlin source name of a function will be different than the generated method name in byte code:
- in internal classes
- with parameters of specific types present - e.g. UInt, UShort etc.
- There might be more...
As a test engine writer I stumble upon this problem in a few classes:
org.junit.platform.engine.discovery.MethodSelector
which - when called from IntelliJ's test runner - provides the correct Kotlin function name, but cannot resolve the underlying Java method.org.junit.platform.engine.support.descriptor.MethodSource
which cannot differentiate betweenmethodName
andgetJavaMethod()
Deliverables
- Implement
MethodSelector
so that it works correctly with all Kotlin function names - Implement
MethodSource
so that it will correctly producemethodName
(Kotlin name) andgetJavaMethod()
.
Alternatively, allow a test engine to change the behaviour of MethodSelector
and MethodSource
.
Addendum
A similar problem may exist with Kotlin class names, e.g. internal or inner classes, but I haven't checked.