You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2020/09/25 11:24:50 UTC
[groovy] branch master updated: enable some javadoc tests
This is an automated email from the ASF dual-hosted git repository.
paulk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git
The following commit(s) were added to refs/heads/master by this push:
new 8270bdc enable some javadoc tests
8270bdc is described below
commit 8270bdcfce8f00a1b157593b0a174f61828a70a9
Author: Paul King <pa...@asert.com.au>
AuthorDate: Fri Sep 25 21:24:38 2020 +1000
enable some javadoc tests
---
src/main/java/groovy/lang/Closure.java | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/src/main/java/groovy/lang/Closure.java b/src/main/java/groovy/lang/Closure.java
index 2328ac0..6fe1eaf 100644
--- a/src/main/java/groovy/lang/Closure.java
+++ b/src/main/java/groovy/lang/Closure.java
@@ -66,7 +66,7 @@ public abstract class Closure<V> extends GroovyObjectSupport implements Cloneabl
* owner first, then the delegate (<b>this is the default strategy</b>).
*
* For example the following code:
- * <pre>
+ * <pre class="groovyTestCase">
* class Test {
* def x = 30
* def y = 40
@@ -122,7 +122,7 @@ public abstract class Closure<V> extends GroovyObjectSupport implements Cloneabl
* With this resolveStrategy set the closure will resolve property references and methods to the owner only
* and not call the delegate at all. For example the following code :
*
- * <pre>
+ * <pre class="groovyTestCase">
* class Test {
* def x = 30
* def y = 40
@@ -139,7 +139,9 @@ public abstract class Closure<V> extends GroovyObjectSupport implements Cloneabl
* }
* }
*
- * new Test().run()
+ * groovy.test.GroovyAssert.shouldFail(MissingPropertyException) {
+ * new Test().run()
+ * }
* </pre>
*
* will throw "No such property: z" error because even if the z variable is declared in the delegate, no
@@ -152,7 +154,7 @@ public abstract class Closure<V> extends GroovyObjectSupport implements Cloneabl
* With this resolveStrategy set the closure will resolve property references and methods to the delegate
* only and entirely bypass the owner. For example the following code :
*
- * <pre>
+ * <pre class="groovyTestCase">
* class Test {
* def x = 30
* def y = 40
@@ -170,7 +172,9 @@ public abstract class Closure<V> extends GroovyObjectSupport implements Cloneabl
* }
* }
*
- * new Test().run()
+ * groovy.test.GroovyAssert.shouldFail {
+ * new Test().run()
+ * }
* </pre>
*
* will throw an error because even if the owner declares a "z" field, the resolution strategy will bypass