Eclipse + Kotlin + Junit: Erros while using @Test annotation [message #1802143] |
Fri, 01 February 2019 13:40  |
Eclipse User |
|
|
|
Hi,
Whenever I use Junit @Test annotation in Kotlin code(see [1] below), Eclipse (or perhaps Kotlin plug-in for Eclipse) generates a bunch of errors that pop up every ten seconds or so, very annoying:
An internal error occurred during: "Kotlin Analysis".
Wrong annotation argument: 0
An internal error occurred during: "Install semantic highlighting".
Wrong annotation argument: 0
An internal error occurred during: "Compute launch button tooltip".
Wrong annotation argument: 0
An internal error occurred during: "Update occurrence annotations".
Wrong annotation argument: 0
The code[1] builds and runs without errors, the test is run as well and the test report is generated successfully.
Any ideas? Anything I can do to prevent/suspend the above errors? Thanks
My environment:
Openjdk 11.0.2 2018-10-16
Eclipse Java EE IDE for Web Developers, Version: 2018-09 (4.9.0) Build id: 20180917-1800
Kotlin plug-in: 0.8.12
Junit 4.12
[1] - test code where the above errors were generated
package test
import org.junit.Assert.assertTrue
import org.junit.Test
class KotlinTests {
companion object a {
@JvmStatic
fun main(args : Array<String>) {
println("In KotlinTests main: argsSize=${args.size}.")
println("In KotlinTests main: args=${args.toString()}.")
println("In KotlinTests main: args0=${args[0]}, args1=${args[1]}.")
}
}
@Test
fun runASimpleTest() {
println("In runASimpleTest")
assertTrue(true)
}
}
[Updated on: Fri, 01 February 2019 13:54] by Moderator
|
|
|
|
Re: Eclipse + Kotlin + Junit: Erros while using @Test annotation [message #1802188 is a reply to message #1802182] |
Sun, 03 February 2019 09:23  |
Eclipse User |
|
|
|
Nitin Dahyabhai wrote on Sun, 03 February 2019 06:36Does this still happen with the current release, 2018-12?
I can't really use 2018-12 release due to a bug in the Kotlin plug-in for Eclipse that doesn't allow to properly create a Kotlin project. @Test annotation issue is also related to another bug in the Kotlin plug-in and should be fixed soon. Watch out for a new release of the Kotlin plug-in if you are having this issue.
|
|
|
Powered by
FUDForum. Page generated in 0.09510 seconds