Open GoogleCodeExporter opened 8 years ago
Another way to avoid the bug is to put new line char after [
The fact whitespace avoids the bug tells me something is seriously wrong with
the way the spec is transformed into the generated code
Original comment by ronald.p...@gmail.com
on 31 Jan 2014 at 8:00
Works just fine for me.
Original comment by pnied...@gmail.com
on 31 Jan 2014 at 11:44
I have a situation that I think is the same bug. In a Geb spec, I have the
following class:
@Stepwise
abstract class AbstractAboutPageSpec extends Specification {
abstract Class<? extends AboutPage> page()
def "page loads"() {
when: to page();
then: {}
}
}
This produces a VerifyError on run:
java.lang.VerifyError: (class:
com/artsquare/gallery/acceptance/ui/AbstractAboutPageSpec, method:
$spock_feature_3_0 signature: ()V) Stack size too large
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Class.java:2575)
at java.lang.Class.getDeclaredFields(Class.java:1908)
at org.spockframework.runtime.SpecInfoBuilder.buildFields(SpecInfoBuilder.java:98)
at org.spockframework.runtime.SpecInfoBuilder.doBuild(SpecInfoBuilder.java:69)
at org.spockframework.runtime.SpecInfoBuilder.buildSuperSpec(SpecInfoBuilder.java:80)
at org.spockframework.runtime.SpecInfoBuilder.doBuild(SpecInfoBuilder.java:67)
at org.spockframework.runtime.SpecInfoBuilder.build(SpecInfoBuilder.java:54)
at org.spockframework.runtime.Sputnik.getSpec(Sputnik.java:80)
at org.spockframework.runtime.Sputnik.runExtensionsIfNecessary(Sputnik.java:88)
at org.spockframework.runtime.Sputnik.getDescription(Sputnik.java:55)
at org.junit.runner.Runner.testCount(Runner.java:41)
Modifying the spec so that the method is called in a given: block fixes the
problem:
def "page loads"() {
given: Class<AboutPage> page = page()
when: to page
then: {}
}
Original comment by christop...@artsquare.com
on 27 Feb 2015 at 9:21
Original issue reported on code.google.com by
ronald.p...@gmail.com
on 31 Jan 2014 at 7:56