[ 
https://issues.apache.org/jira/browse/GROOVY-9643?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17157013#comment-17157013
 ] 

Paul King commented on GROOVY-9643:
-----------------------------------

Attached zip highlights the problem.

Code:
{code}
import spock.lang.Specification

class MathSpec extends Specification {
    def divByZero() {
        when: 1/0
        then: thrown(ArithmeticException)
    }
}
{code}
Build file:
{code}
apply plugin: 'groovy'

repositories {
    jcenter()
//    mavenLocal()
    maven { url "https://oss.jfrog.org/oss-snapshot-local/"; }
}

ext.groovyVersion = '3.0.5-SNAPSHOT'
//ext.groovyVersion = '3.0.4'
//ext.groovyVersion = '2.5.12'

dependencies {
    testImplementation "org.codehaus.groovy:groovy:$groovyVersion"
    testImplementation "org.spockframework:spock-core:2.0-M3-groovy-3.0"
//    testImplementation "org.spockframework:spock-core:2.0-groovy-3.0-SNAPSHOT"
}

test {
    jvmArgs = ["-noverify"]
    useJUnitPlatform()
}
{code}

> Using Spock thrown() method causes IllegalAccessError for 2.0-M2-groovy-3.0 
> on JDK 8 with noverify switch
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: GROOVY-9643
>                 URL: https://issues.apache.org/jira/browse/GROOVY-9643
>             Project: Groovy
>          Issue Type: Bug
>    Affects Versions: 3.0.4
>            Reporter: Paul King
>            Priority: Major
>         Attachments: groovySpockThrown.zip
>
>
> See https://github.com/spockframework/spock/issues/1177



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to