Skip to main content



      Home
Home » Newcomers » Newcomers » Eclipse + Kotlin + Junit: Erros while using @Test annotation
Eclipse + Kotlin + Junit: Erros while using @Test annotation [message #1802143] Fri, 01 February 2019 13:40 Go to next message
Eclipse UserFriend
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 #1802182 is a reply to message #1802143] Sun, 03 February 2019 01:36 Go to previous messageGo to next message
Eclipse UserFriend
Does this still happen with the current release, 2018-12?

[Updated on: Sun, 03 February 2019 01:37] 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 Go to previous message
Eclipse UserFriend
Nitin Dahyabhai wrote on Sun, 03 February 2019 06:36
Does 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.
Previous Topic:[Linux] bin folder not shown
Next Topic:Not able to debug code in eclipse.
Goto Forum:
  


Current Time: Wed Jul 16 06:05:43 EDT 2025

Powered by FUDForum. Page generated in 0.09510 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top