Open GoogleCodeExporter opened 9 years ago
This should already be possible with Groovy's `@AnnotationCollector`.
Original comment by pnied...@gmail.com
on 9 Dec 2014 at 12:18
If it is, that's a transform I don't know how to use, and I think my use case
(essentially, test profiles) is a common one. Could the docs get an example?
Original comment by christop...@artsquare.com
on 9 Dec 2014 at 12:25
It's a Groovy feature, and you should find plenty of information on the web.
Original comment by pnied...@gmail.com
on 9 Dec 2014 at 12:26
(We welcome contributions to http://docs.spockframework.org.)
Original comment by pnied...@gmail.com
on 9 Dec 2014 at 12:28
I've looked over the docs for @AnnotationCollector, and it appears to me that
it pushes the definition for the values off to the class that's finally
annotated, meaning that it can't be used for the intended goal of specifying
the condition closure in one spot.
Original comment by christop...@artsquare.com
on 9 Dec 2014 at 12:34
Values can be specified on the original annotation or collector annotation.
Both is supported.
Original comment by pnied...@gmail.com
on 9 Dec 2014 at 2:09
@Requires and @IgnoreIf can't be meta-annotated on a collector annotation
because their Targets don't include ANNOTATION. My naive attempt at providing a
default "value" in the Groovy annotation produced compile errors (in the
GRECLIPSE compiler) because the parser was apparently unable to figure out how
to compile a Groovy '@interface'.
Original comment by christop...@artsquare.com
on 9 Dec 2014 at 7:54
Thanks for the feedback. I'll see what we can do to make @AnnotationCollector
work with Spock annotations.
Original comment by pnied...@gmail.com
on 13 Dec 2014 at 1:36
Original comment by pnied...@gmail.com
on 1 Mar 2015 at 11:45
Original issue reported on code.google.com by
christop...@artsquare.com
on 9 Dec 2014 at 12:10