Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 18:40 Go to next message
L C is currently offline L CFriend
Messages: 17
Registered: January 2019
Junior Member
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 18:54]

Report message to a moderator

Re: Eclipse + Kotlin + Junit: Erros while using @Test annotation [message #1802182 is a reply to message #1802143] Sun, 03 February 2019 06:36 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4435
Registered: July 2009
Senior Member

Does this still happen with the current release, 2018-12?

_
Nitin Dahyabhai
Eclipse Web Tools Platform

[Updated on: Sun, 03 February 2019 06:37]

Report message to a moderator

Re: Eclipse + Kotlin + Junit: Erros while using @Test annotation [message #1802188 is a reply to message #1802182] Sun, 03 February 2019 14:23 Go to previous message
L C is currently offline L CFriend
Messages: 17
Registered: January 2019
Junior Member
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: Tue Apr 23 11:30:40 GMT 2024

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

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

Back to the top