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 2016/03/03 23:14:08 UTC

[1/5] groovy git commit: add XmlJavadocAssertionTest and enable testing of some groovy-xml javadoc examples

Repository: groovy
Updated Branches:
  refs/heads/GROOVY_2_4_X 342451759 -> c1dda9d86


add XmlJavadocAssertionTest and enable testing of some groovy-xml javadoc examples


Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/0c830952
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/0c830952
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/0c830952

Branch: refs/heads/GROOVY_2_4_X
Commit: 0c83095287b84a59c252cd5d2fdec9cc982bc4a5
Parents: 3424517
Author: pascalschumacher <pa...@gmx.net>
Authored: Thu Mar 3 21:33:45 2016 +0100
Committer: pascalschumacher <pa...@gmx.net>
Committed: Thu Mar 3 23:13:55 2016 +0100

----------------------------------------------------------------------
 .../main/groovy/groovy/xml/StaxBuilder.groovy   |  9 ++++---
 .../src/main/java/groovy/util/XmlParser.java    |  2 +-
 .../src/main/java/groovy/util/XmlSlurper.java   |  4 +--
 .../groovy/util/slurpersupport/GPathResult.java |  6 +++--
 .../groovy/xml/XmlJavadocAssertionTest.groovy   | 27 ++++++++++++++++++++
 5 files changed, 39 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/0c830952/subprojects/groovy-xml/src/main/groovy/groovy/xml/StaxBuilder.groovy
----------------------------------------------------------------------
diff --git a/subprojects/groovy-xml/src/main/groovy/groovy/xml/StaxBuilder.groovy b/subprojects/groovy-xml/src/main/groovy/groovy/xml/StaxBuilder.groovy
index 9ed2879..91dac1e 100644
--- a/subprojects/groovy-xml/src/main/groovy/groovy/xml/StaxBuilder.groovy
+++ b/subprojects/groovy-xml/src/main/groovy/groovy/xml/StaxBuilder.groovy
@@ -21,19 +21,20 @@ package groovy.xml
 /**
  * A Groovy builder that works with Stax processors.
  * A typical usage is as follows:
- * <pre>
+ * <pre class="groovyTestCase">
+ * import javax.xml.stream.XMLOutputFactory
  * def factory = XMLOutputFactory.newInstance()
  * def writer = new StringWriter()
- * def builder = new StaxBuilder(factory.createXMLStreamWriter(writer))
+ * def builder = new groovy.xml.StaxBuilder(factory.createXMLStreamWriter(writer))
  * builder.root1(a:5, b:7) {
  *     elem1('hello1')
  *     elem2('hello2')
  *     elem3(x:7)
  * }
- * assert writer.toString() == '<?xml version="1.0" ?><root1 a="5" b="7"><elem1>hello1</elem1><elem2>hello2</elem2><elem3 x="7" /></root1>'
+ * assert writer.toString() == '<?xml version="1.0" ?><root1 a="5" b="7"><elem1>hello1</elem1><elem2>hello2</elem2><elem3 x="7"></elem3></root1>'
  * </pre>
  * Or an external library such as Jettison can be used as follows:
- * <pre>
+ * <pre class="groovyTestCase">
  * @Grab('org.codehaus.jettison:jettison:1.2')
  * import org.codehaus.jettison.mapped.*
  * import javax.xml.stream.XMLStreamException

http://git-wip-us.apache.org/repos/asf/groovy/blob/0c830952/subprojects/groovy-xml/src/main/java/groovy/util/XmlParser.java
----------------------------------------------------------------------
diff --git a/subprojects/groovy-xml/src/main/java/groovy/util/XmlParser.java b/subprojects/groovy-xml/src/main/java/groovy/util/XmlParser.java
index 2733e22..40eecb9 100644
--- a/subprojects/groovy-xml/src/main/java/groovy/util/XmlParser.java
+++ b/subprojects/groovy-xml/src/main/java/groovy/util/XmlParser.java
@@ -57,7 +57,7 @@ import java.util.Map;
  * most simple use cases of processing XML.
  * <p>
  * Example usage:
- * <pre>
+ * <pre class="groovyTestCase">
  * def xml = '&lt;root&gt;&lt;one a1="uno!"/&gt;&lt;two&gt;Some text!&lt;/two&gt;&lt;/root&gt;'
  * def rootNode = new XmlParser().parseText(xml)
  * assert rootNode.name() == 'root'

http://git-wip-us.apache.org/repos/asf/groovy/blob/0c830952/subprojects/groovy-xml/src/main/java/groovy/util/XmlSlurper.java
----------------------------------------------------------------------
diff --git a/subprojects/groovy-xml/src/main/java/groovy/util/XmlSlurper.java b/subprojects/groovy-xml/src/main/java/groovy/util/XmlSlurper.java
index 49ff017..209167f 100644
--- a/subprojects/groovy-xml/src/main/java/groovy/util/XmlSlurper.java
+++ b/subprojects/groovy-xml/src/main/java/groovy/util/XmlSlurper.java
@@ -56,7 +56,7 @@ import org.xml.sax.helpers.DefaultHandler;
 /**
  * Parse XML into a document tree that may be traversed similar to XPath
  * expressions.  For example:
- * <pre>
+ * <pre class="groovyTestCase">
  * def rootNode = new XmlSlurper().parseText(
  *    '&lt;root&gt;&lt;one a1="uno!"/&gt;&lt;two&gt;Some text!&lt;/two&gt;&lt;/root&gt;' )
  *
@@ -68,7 +68,7 @@ import org.xml.sax.helpers.DefaultHandler;
  * <p>
  * Note that in some cases, a 'selector' expression may not resolve to a
  * single node.  For example:
- * <pre>
+ * <pre class="groovyTestCase">
  * def rootNode = new XmlSlurper().parseText(
  *    '''&lt;root&gt;
  *         &lt;a&gt;one!&lt;/a&gt;

http://git-wip-us.apache.org/repos/asf/groovy/blob/0c830952/subprojects/groovy-xml/src/main/java/groovy/util/slurpersupport/GPathResult.java
----------------------------------------------------------------------
diff --git a/subprojects/groovy-xml/src/main/java/groovy/util/slurpersupport/GPathResult.java b/subprojects/groovy-xml/src/main/java/groovy/util/slurpersupport/GPathResult.java
index 72ab4fd..4bebe67 100644
--- a/subprojects/groovy-xml/src/main/java/groovy/util/slurpersupport/GPathResult.java
+++ b/subprojects/groovy-xml/src/main/java/groovy/util/slurpersupport/GPathResult.java
@@ -374,7 +374,8 @@ public abstract class GPathResult extends GroovyObjectSupport implements Writabl
 
     /**
      * Supports the subscript operator for a GPathResult.
-     * <pre>
+     * <pre class="groovyTestCase">
+     * import groovy.util.slurpersupport.*
      * def text = """
      * &lt;characterList&gt;
      *   &lt;character/&gt;
@@ -416,7 +417,8 @@ public abstract class GPathResult extends GroovyObjectSupport implements Writabl
 
     /**
      * Supports the range subscript operator for a GPathResult.
-     * <pre>
+     * <pre class="groovyTestCase">
+     * import groovy.util.slurpersupport.*
      * def text = """
      * &lt;characterList>
      *   &lt;character&gt;Wallace&lt;/character&gt;

http://git-wip-us.apache.org/repos/asf/groovy/blob/0c830952/subprojects/groovy-xml/src/test/groovy/groovy/xml/XmlJavadocAssertionTest.groovy
----------------------------------------------------------------------
diff --git a/subprojects/groovy-xml/src/test/groovy/groovy/xml/XmlJavadocAssertionTest.groovy b/subprojects/groovy-xml/src/test/groovy/groovy/xml/XmlJavadocAssertionTest.groovy
new file mode 100644
index 0000000..812cd87
--- /dev/null
+++ b/subprojects/groovy-xml/src/test/groovy/groovy/xml/XmlJavadocAssertionTest.groovy
@@ -0,0 +1,27 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements. See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership. The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License. You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied. See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package groovy.json
+
+import org.junit.runners.Suite
+import org.junit.runner.RunWith
+
+@RunWith(Suite)
+@Suite.SuiteClasses(JavadocAssertionTestSuite)
+class XmlJavadocAssertionTest {
+}


[2/5] groovy git commit: add GroovyTestJavadocAssertionTest and enable testing of some groovy-test javadoc examples

Posted by pa...@apache.org.
add GroovyTestJavadocAssertionTest and enable testing of some groovy-test javadoc examples


Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/bfd60017
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/bfd60017
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/bfd60017

Branch: refs/heads/GROOVY_2_4_X
Commit: bfd60017a2a8a8b6420a93c790a041520ffed5f5
Parents: e4feabc
Author: pascalschumacher <pa...@gmx.net>
Authored: Thu Mar 3 22:45:29 2016 +0100
Committer: pascalschumacher <pa...@gmx.net>
Committed: Thu Mar 3 23:13:56 2016 +0100

----------------------------------------------------------------------
 .../groovy/mock/interceptor/MockFor.groovy      |  8 +++---
 .../groovy/mock/interceptor/StubFor.groovy      |  2 +-
 .../test/GroovyTestJavadocAssertionTest.groovy  | 27 ++++++++++++++++++++
 3 files changed, 32 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/bfd60017/subprojects/groovy-test/src/main/groovy/groovy/mock/interceptor/MockFor.groovy
----------------------------------------------------------------------
diff --git a/subprojects/groovy-test/src/main/groovy/groovy/mock/interceptor/MockFor.groovy b/subprojects/groovy-test/src/main/groovy/groovy/mock/interceptor/MockFor.groovy
index f5bda34..fae9f09 100644
--- a/subprojects/groovy-test/src/main/groovy/groovy/mock/interceptor/MockFor.groovy
+++ b/subprojects/groovy-test/src/main/groovy/groovy/mock/interceptor/MockFor.groovy
@@ -36,7 +36,7 @@ import java.util.regex.Pattern
  * automatically ends with a verify().
  *
  * Typical usage is as follows:
- * <pre>
+ * <pre class="groovyTestCase">
  * import groovy.mock.interceptor.MockFor
  *
  * class Person {
@@ -100,7 +100,7 @@ class MockFor {
      * The optional <code>interceptConstruction</code> flag allows mocking of
      * constructor calls. These are represented in the demand specification
      * using the class name as this example shows:
-     * <pre>
+     * <pre class="groovyTestCase">
      * import groovy.mock.interceptor.MockFor
      * class Person {
      *   String first, last
@@ -160,7 +160,7 @@ class MockFor {
      * The <code>filter</code> object is invoked using the normal Groovy <code>isCase()</code> semantics.
      *
      * Here are some examples:
-     * <pre>
+     * <pre class="groovyTestCase">
      * import groovy.mock.interceptor.MockFor
      * class Person {
      *   String first, last
@@ -212,7 +212,7 @@ class MockFor {
      * will be instantiated for the original class.
      *
      * Typical example:
-     * <pre>
+     * <pre class="groovyTestCase">
      * import groovy.mock.interceptor.MockFor
      *
      * class Person {

http://git-wip-us.apache.org/repos/asf/groovy/blob/bfd60017/subprojects/groovy-test/src/main/groovy/groovy/mock/interceptor/StubFor.groovy
----------------------------------------------------------------------
diff --git a/subprojects/groovy-test/src/main/groovy/groovy/mock/interceptor/StubFor.groovy b/subprojects/groovy-test/src/main/groovy/groovy/mock/interceptor/StubFor.groovy
index e16cf3b..deb069f 100644
--- a/subprojects/groovy-test/src/main/groovy/groovy/mock/interceptor/StubFor.groovy
+++ b/subprojects/groovy-test/src/main/groovy/groovy/mock/interceptor/StubFor.groovy
@@ -35,7 +35,7 @@ import java.util.regex.Pattern
  * is left to the user.
  *
  * Typical usage is as follows:
- * <pre>
+ * <<pre class="groovyTestCase">
  * import groovy.mock.interceptor.StubFor
  *
  * class Person {

http://git-wip-us.apache.org/repos/asf/groovy/blob/bfd60017/subprojects/groovy-test/src/test/groovy/groovy/test/GroovyTestJavadocAssertionTest.groovy
----------------------------------------------------------------------
diff --git a/subprojects/groovy-test/src/test/groovy/groovy/test/GroovyTestJavadocAssertionTest.groovy b/subprojects/groovy-test/src/test/groovy/groovy/test/GroovyTestJavadocAssertionTest.groovy
new file mode 100644
index 0000000..204718f
--- /dev/null
+++ b/subprojects/groovy-test/src/test/groovy/groovy/test/GroovyTestJavadocAssertionTest.groovy
@@ -0,0 +1,27 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements. See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership. The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License. You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied. See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package groovy.test
+
+import org.junit.runners.Suite
+import org.junit.runner.RunWith
+
+@RunWith(Suite)
+@Suite.SuiteClasses(JavadocAssertionTestSuite)
+class GroovyTestJavadocAssertionTest {
+}


[3/5] groovy git commit: add XmlJavadocAssertionTest and enable testing of some groovy-xml javadoc examples

Posted by pa...@apache.org.
add XmlJavadocAssertionTest and enable testing of some groovy-xml javadoc examples

correct package declaration of XmlJavadocAssertionTest


Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/e4feabc7
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/e4feabc7
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/e4feabc7

Branch: refs/heads/GROOVY_2_4_X
Commit: e4feabc7960e1ab482e01deca260555658201d96
Parents: 0c83095
Author: pascalschumacher <pa...@gmx.net>
Authored: Thu Mar 3 22:43:03 2016 +0100
Committer: pascalschumacher <pa...@gmx.net>
Committed: Thu Mar 3 23:13:56 2016 +0100

----------------------------------------------------------------------
 .../src/test/groovy/groovy/xml/XmlJavadocAssertionTest.groovy      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/e4feabc7/subprojects/groovy-xml/src/test/groovy/groovy/xml/XmlJavadocAssertionTest.groovy
----------------------------------------------------------------------
diff --git a/subprojects/groovy-xml/src/test/groovy/groovy/xml/XmlJavadocAssertionTest.groovy b/subprojects/groovy-xml/src/test/groovy/groovy/xml/XmlJavadocAssertionTest.groovy
index 812cd87..d3115f5 100644
--- a/subprojects/groovy-xml/src/test/groovy/groovy/xml/XmlJavadocAssertionTest.groovy
+++ b/subprojects/groovy-xml/src/test/groovy/groovy/xml/XmlJavadocAssertionTest.groovy
@@ -16,7 +16,7 @@
  *  specific language governing permissions and limitations
  *  under the License.
  */
-package groovy.json
+package groovy.xml
 
 import org.junit.runners.Suite
 import org.junit.runner.RunWith


[5/5] groovy git commit: correct JsonSlurperClassic javadoc example

Posted by pa...@apache.org.
correct JsonSlurperClassic javadoc example


Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/c1dda9d8
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/c1dda9d8
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/c1dda9d8

Branch: refs/heads/GROOVY_2_4_X
Commit: c1dda9d8679eb82e080b98d7688e723fe4c8292d
Parents: 4eb1521
Author: pascalschumacher <pa...@gmx.net>
Authored: Thu Mar 3 23:11:51 2016 +0100
Committer: pascalschumacher <pa...@gmx.net>
Committed: Thu Mar 3 23:13:57 2016 +0100

----------------------------------------------------------------------
 .../groovy-json/src/main/java/groovy/json/JsonSlurperClassic.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/c1dda9d8/subprojects/groovy-json/src/main/java/groovy/json/JsonSlurperClassic.java
----------------------------------------------------------------------
diff --git a/subprojects/groovy-json/src/main/java/groovy/json/JsonSlurperClassic.java b/subprojects/groovy-json/src/main/java/groovy/json/JsonSlurperClassic.java
index b2f5416..eb984af 100644
--- a/subprojects/groovy-json/src/main/java/groovy/json/JsonSlurperClassic.java
+++ b/subprojects/groovy-json/src/main/java/groovy/json/JsonSlurperClassic.java
@@ -48,7 +48,7 @@ import static groovy.json.JsonTokenType.STRING;
  * <p>
  * Example usage:
  * <code><pre class="groovyTestCase">
- * def slurper = new groovy.json.JsonSlurper()
+ * def slurper = new groovy.json.JsonSlurperClassic()
  * def result = slurper.parseText('{"person":{"name":"Guillaume","age":33,"pets":["dog","cat"]}}')
  *
  * assert result.person.name == "Guillaume"


[4/5] groovy git commit: grooy-json extend testing of javadoc examples

Posted by pa...@apache.org.
grooy-json extend testing of javadoc examples


Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/4eb15215
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/4eb15215
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/4eb15215

Branch: refs/heads/GROOVY_2_4_X
Commit: 4eb15215a5dcc08798dad7277adff82c360dc26a
Parents: bfd6001
Author: pascalschumacher <pa...@gmx.net>
Authored: Thu Mar 3 23:07:44 2016 +0100
Committer: pascalschumacher <pa...@gmx.net>
Committed: Thu Mar 3 23:13:57 2016 +0100

----------------------------------------------------------------------
 .../src/main/java/groovy/json/JsonBuilder.java  | 46 ++++++++++----------
 .../src/main/java/groovy/json/JsonSlurper.java  |  4 +-
 .../java/groovy/json/JsonSlurperClassic.java    |  4 +-
 3 files changed, 27 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/4eb15215/subprojects/groovy-json/src/main/java/groovy/json/JsonBuilder.java
----------------------------------------------------------------------
diff --git a/subprojects/groovy-json/src/main/java/groovy/json/JsonBuilder.java b/subprojects/groovy-json/src/main/java/groovy/json/JsonBuilder.java
index c4f6bbd..6a7804f 100644
--- a/subprojects/groovy-json/src/main/java/groovy/json/JsonBuilder.java
+++ b/subprojects/groovy-json/src/main/java/groovy/json/JsonBuilder.java
@@ -35,7 +35,7 @@ import java.util.*;
  * to be able to learn about the various possibilities of usage.
  * <p>
  * Example:
- * <pre><code>
+ * <pre><code class="groovyTestCase">
  *       def builder = new groovy.json.JsonBuilder()
  *       def root = builder.people {
  *           person {
@@ -90,8 +90,8 @@ public class JsonBuilder extends GroovyObjectSupport implements Writable {
      * Named arguments can be passed to the JSON builder instance to create a root JSON object
      * <p>
      * Example:
-     * <pre><code>
-     * def json = new JsonBuilder()
+     * <pre><code class="groovyTestCase">
+     * def json = new groovy.json.JsonBuilder()
      * json name: "Guillaume", age: 33
      *
      * assert json.toString() == '{"name":"Guillaume","age":33}'
@@ -110,8 +110,8 @@ public class JsonBuilder extends GroovyObjectSupport implements Writable {
      * A list of elements as arguments to the JSON builder creates a root JSON array
      * <p>
      * Example:
-     * <pre><code>
-     * def json = new JsonBuilder()
+     * <pre><code class="groovyTestCase">
+     * def json = new groovy.json.JsonBuilder()
      * def result = json([1, 2, 3])
      *
      * assert result instanceof List
@@ -131,8 +131,8 @@ public class JsonBuilder extends GroovyObjectSupport implements Writable {
      * Varargs elements as arguments to the JSON builder create a root JSON array
      * <p>
      * Example:
-     * <pre><code>
-     * def json = new JsonBuilder()
+     * <pre><code class="groovyTestCase">
+     * def json = new groovy.json.JsonBuilder()
      * def result = json 1, 2, 3
      *
      * assert result instanceof List
@@ -157,13 +157,13 @@ public class JsonBuilder extends GroovyObjectSupport implements Writable {
      * the closure to each object in the collection
      * <p>
      * Example:
-     * <pre><code>
+     * <pre><code class="groovyTestCase">
      * class Author {
      *      String name
      * }
      * def authors = [new Author (name: "Guillaume"), new Author (name: "Jochen"), new Author (name: "Paul")]
      *
-     * def json = new JsonBuilder()
+     * def json = new groovy.json.JsonBuilder()
      * json authors, { Author author ->
      *      name author.name
      * }
@@ -197,8 +197,8 @@ public class JsonBuilder extends GroovyObjectSupport implements Writable {
      * A closure passed to a JSON builder will create a root JSON object
      * <p>
      * Example:
-     * <pre><code>
-     * def json = new JsonBuilder()
+     * <pre><code class="groovyTestCase">
+     * def json = new groovy.json.JsonBuilder()
      * def result = json {
      *      name "Guillaume"
      *      age 33
@@ -229,8 +229,8 @@ public class JsonBuilder extends GroovyObjectSupport implements Writable {
      * </ul>
      * <p>
      * Example with a classicala builder-style:
-     * <pre><code>
-     * def json = new JsonBuilder()
+     * <pre><code class="groovyTestCase">
+     * def json = new groovy.json.JsonBuilder()
      * def result = json.person {
      *      name "Guillaume"
      *      age 33
@@ -241,8 +241,8 @@ public class JsonBuilder extends GroovyObjectSupport implements Writable {
      * </code></pre>
      *
      * Or alternatively with a method call taking named arguments:
-     * <pre><code>
-     * def json = new JsonBuilder()
+     * <pre><code class="groovyTestCase">
+     * def json = new groovy.json.JsonBuilder()
      * json.person name: "Guillaume", age: 33
      *
      * assert json.toString() == '{"person":{"name":"Guillaume","age":33}}'
@@ -254,16 +254,16 @@ public class JsonBuilder extends GroovyObjectSupport implements Writable {
      * will be merged together &mdash;
      * the closure properties overriding the map key/values
      * in case the same key is used.
-     * <pre><code>
-     * def json = new JsonBuilder()
+     * <pre><code class="groovyTestCase">
+     * def json = new groovy.json.JsonBuilder()
      * json.person(name: "Guillaume", age: 33) { town "Paris" }
      *
      * assert json.toString() == '{"person":{"name":"Guillaume","age":33,"town":"Paris"}}'
      * </code></pre>
      *
      * The empty args call will create a key whose value will be an empty JSON object:
-     * <pre><code>
-     * def json = new JsonBuilder()
+     * <pre><code class="groovyTestCase">
+     * def json = new groovy.json.JsonBuilder()
      * json.person()
      *
      * assert json.toString() == '{"person":{}}'
@@ -334,8 +334,8 @@ public class JsonBuilder extends GroovyObjectSupport implements Writable {
      * Serializes the internal data structure built with the builder to a conformant JSON payload string
      * <p>
      * Example:
-     * <pre><code>
-     * def json = new JsonBuilder()
+     * <pre><code class="groovyTestCase">
+     * def json = new groovy.json.JsonBuilder()
      * json { temperature 37 }
      *
      * assert json.toString() == '{"temperature":37}'
@@ -366,8 +366,8 @@ public class JsonBuilder extends GroovyObjectSupport implements Writable {
      * so that you can have the builder serialize itself the JSON payload to a writer.
      * <p>
      * Example:
-     * <pre><code>
-     * def json = new JsonBuilder()
+     * <pre><code class="groovyTestCase">
+     * def json = new groovy.json.JsonBuilder()
      * json { temperature 37 }
      *
      * def out = new StringWriter()

http://git-wip-us.apache.org/repos/asf/groovy/blob/4eb15215/subprojects/groovy-json/src/main/java/groovy/json/JsonSlurper.java
----------------------------------------------------------------------
diff --git a/subprojects/groovy-json/src/main/java/groovy/json/JsonSlurper.java b/subprojects/groovy-json/src/main/java/groovy/json/JsonSlurper.java
index 156c339..959d3b4 100644
--- a/subprojects/groovy-json/src/main/java/groovy/json/JsonSlurper.java
+++ b/subprojects/groovy-json/src/main/java/groovy/json/JsonSlurper.java
@@ -40,8 +40,8 @@ import java.util.*;
  * JSON slurper parses text or reader content into a data structure of lists and maps.
  * <p>
  * Example usage:
- * <code><pre>
- * def slurper = new JsonSlurper()
+ * <code><pre class="groovyTestCase">
+ * def slurper = new groovy.json.JsonSlurper()
  * def result = slurper.parseText('{"person":{"name":"Guillaume","age":33,"pets":["dog","cat"]}}')
  *
  * assert result.person.name == "Guillaume"

http://git-wip-us.apache.org/repos/asf/groovy/blob/4eb15215/subprojects/groovy-json/src/main/java/groovy/json/JsonSlurperClassic.java
----------------------------------------------------------------------
diff --git a/subprojects/groovy-json/src/main/java/groovy/json/JsonSlurperClassic.java b/subprojects/groovy-json/src/main/java/groovy/json/JsonSlurperClassic.java
index a851c9f..b2f5416 100644
--- a/subprojects/groovy-json/src/main/java/groovy/json/JsonSlurperClassic.java
+++ b/subprojects/groovy-json/src/main/java/groovy/json/JsonSlurperClassic.java
@@ -47,8 +47,8 @@ import static groovy.json.JsonTokenType.STRING;
  * JSON slurper which parses text or reader content into a data structure of lists and maps.
  * <p>
  * Example usage:
- * <code><pre>
- * def slurper = new JsonSlurper()
+ * <code><pre class="groovyTestCase">
+ * def slurper = new groovy.json.JsonSlurper()
  * def result = slurper.parseText('{"person":{"name":"Guillaume","age":33,"pets":["dog","cat"]}}')
  *
  * assert result.person.name == "Guillaume"