Open
Description
Description
Generated Java tests for Kotlin files.
Kotlin code is addressed correctly from Java code.
But links in Java docs are not resolved.
To Reproduce
- Install the latest UnitTestBot plugin build from main in IntelliJ Idea 2022.2.3 (latest)
- Set Java as the language to generate tests in
- Create a project with Kotlin support
- Create a package in src/main/kotlin sources root
- Add the following code to a Kotlin file:
package ort.utbot.examples.functions
fun foo(name: String, number: Int = 42, toUpperCase: Boolean = false) =
(if (toUpperCase) name.uppercase() else name) + number
- Generate tests for the file
- Render Java docs and check the links
Expected behavior
Links in Java docs are supposed to lead to the used code.
Actual behavior
Links in Java docs are not resolved.
Visual proofs (screenshots, logs, images)
/**
* @utbot.classUnderTest {@link DefaultArgumentsKt}
* @utbot.methodUnderTest {@link DefaultArgumentsKt#foo(String, int, boolean)}
*/
@Test
@DisplayName("foo: arg_0 has special characters, number < 0, toUpperCase = true")
public void testFooWithBlankString() {
String actual = DefaultArgumentsKt.foo("\n\t\r", -1, true);
String expected = "\n\t\r-1";
assertEquals(expected, actual);
}
Environment
Windows 10 Pro
IntelliJ IDEA 2022.2.3
Gradle project with JDK 11
Additional context
Not reproducing in IDEA 2022.1.4 (links are resolved):
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Todo