groovy

assertEquals() raises IllegalAccessError for Lists

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Won't Fix
  • Affects Version/s: 1.5
  • Fix Version/s: 1.5.2
  • Component/s: None
  • Labels:
    None
  • Number of attachments :
    0

Description

The following test causes an exception ...

void testIt() {
assertEquals([1,2], [3,4])
}

That should fail yes, bit raises the following exception ...

java.lang.IllegalAccessError: tried to access method junit.framework.Assert.failNotEquals(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V from class groovy.util.GroovyTestCase
at groovy.util.GroovyTestCase.assertEquals(GroovyTestCase.java:385)
at groovy.util.GroovyTestCase.assertEquals(GroovyTestCase.java:389)

Activity

Hide
Paul King added a comment -

What version of Groovy do you have? The example seems to work for me with HEAD.

Show
Paul King added a comment - What version of Groovy do you have? The example seems to work for me with HEAD.
Hide
Luke Daley added a comment -

Hrm. Works for me too. Also seems to work on 1.5.0 and 1.5.1.

I was getting this using Maven. I am thinking this might be due to a mismatch between junit versions or something. I'll move the issue to that project.

Apologies, should have done more testing.

Show
Luke Daley added a comment - Hrm. Works for me too. Also seems to work on 1.5.0 and 1.5.1. I was getting this using Maven. I am thinking this might be due to a mismatch between junit versions or something. I'll move the issue to that project. Apologies, should have done more testing.
Hide
Paul King added a comment -

close off release 1.5.4

Show
Paul King added a comment - close off release 1.5.4

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: