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 2019/05/27 18:51:42 UTC

[groovy] branch master updated (af69a7b -> c59df61)

This is an automated email from the ASF dual-hosted git repository.

paulk pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git.


    from af69a7b  GROOVY-9145: Add DGSM `dumpAll` to `Thread`
     new d06812d  refactor test
     new c59df61  GROOVY-8647: use new class for gradle task

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/test/groovy/bugs/Groovy9141.groovy  | 24 ++++++++++++++++--------
 subprojects/groovy-console/build.gradle |  2 +-
 2 files changed, 17 insertions(+), 9 deletions(-)


[groovy] 02/02: GROOVY-8647: use new class for gradle task

Posted by pa...@apache.org.
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

commit c59df61629e1a9d88d58b519d16ebe857973a58c
Author: Paul King <pa...@asert.com.au>
AuthorDate: Tue May 28 04:50:47 2019 +1000

    GROOVY-8647: use new class for gradle task
---
 subprojects/groovy-console/build.gradle | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/subprojects/groovy-console/build.gradle b/subprojects/groovy-console/build.gradle
index c55970d..44f9bdb 100644
--- a/subprojects/groovy-console/build.gradle
+++ b/subprojects/groovy-console/build.gradle
@@ -30,6 +30,6 @@ dependencies {
 task console(type: JavaExec, dependsOn:classes) {
     jvmArgs += ["-Dgroovy.attach.groovydoc=true"]
 
-    main = 'groovy.ui.Console'
+    main = 'groovy.console.ui.Console'
     classpath = sourceSets.main.runtimeClasspath
 }


[groovy] 01/02: refactor test

Posted by pa...@apache.org.
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

commit d06812d99109ad6919513855f6c3f696356418d0
Author: Paul King <pa...@asert.com.au>
AuthorDate: Mon May 27 16:23:43 2019 +1000

    refactor test
---
 src/test/groovy/bugs/Groovy9141.groovy | 24 ++++++++++++++++--------
 1 file changed, 16 insertions(+), 8 deletions(-)

diff --git a/src/test/groovy/bugs/Groovy9141.groovy b/src/test/groovy/bugs/Groovy9141.groovy
index 0889d36..c5d707c 100644
--- a/src/test/groovy/bugs/Groovy9141.groovy
+++ b/src/test/groovy/bugs/Groovy9141.groovy
@@ -26,31 +26,39 @@ import static org.codehaus.groovy.control.ParserVersion.V_2
 
 @CompileStatic
 final class Groovy9141 extends CompilableTestSupport {
-    private static final String METHOD_DEF = '''
-        abstract meth() {
-            println 42
-        }
+    private static final String ABSTRACT_METHOD_WITH_BODY = '''
+        abstract meth() { }
     '''
 
+    // not a language requirement but script-level check takes precedence in current implementation
     void testAbstractMethodWithBodyInScript() {
-        def err = shouldNotCompile METHOD_DEF
-        assert err =~ / You cannot define an abstract method\[meth\] in the script. Try removing the 'abstract' /
+        def err = shouldNotCompile ABSTRACT_METHOD_WITH_BODY
+        assert err =~ / You cannot define an abstract method\[meth] in the script. Try removing the 'abstract' /
     }
 
     void testAbstractMethodWithBodyInClass() {
         def err = shouldNotCompile """
             class Main {
-                $METHOD_DEF
+                $ABSTRACT_METHOD_WITH_BODY
             }
         """
         // not a language requirement but class level check takes precedence in current implementation
         assert err =~ / Can't have an abstract method in a non-abstract class. /
     }
 
+    void testAbstractMethodWithBodyInCAbstractlass() {
+        def err = shouldNotCompile """
+            abstract class Main {
+                $ABSTRACT_METHOD_WITH_BODY
+            }
+        """
+        assert err =~ / You defined an abstract method\[meth] with a body. Try removing the method body @ line /
+    }
+
     void testAbstractMethodWithBodyInScript_oldParser() {
         def cc = new CompilerConfiguration(parserVersion: V_2)
         def err = shouldFail {
-            new GroovyShell(cc).evaluate METHOD_DEF
+            new GroovyShell(cc).evaluate ABSTRACT_METHOD_WITH_BODY
         }
         assert err =~ / Abstract methods do not define a body/
     }