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/04/20 12:39:38 UTC

[groovy] branch master updated (33eee73 -> c5ff375)

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 33eee73  GROOVY-9515: MethodHandle with spread args should not be cached (#1227)
     new 18b7595  GROOVY-8774: refine test
     new c5ff375  GROOVY-4554: add test for case known to work

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:
 .../{Groovy8774Bug.groovy => Groovy4554Bug.groovy}       | 16 ++++++++--------
 .../groovy/tools/stubgenerator/Groovy8774Bug.groovy      |  6 ++++--
 2 files changed, 12 insertions(+), 10 deletions(-)
 copy src/test/org/codehaus/groovy/tools/stubgenerator/{Groovy8774Bug.groovy => Groovy4554Bug.groovy} (71%)


[groovy] 01/02: GROOVY-8774: refine 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 18b759503ff8168a87c1f6119fcefede934ccc3f
Author: Paul King <pa...@asert.com.au>
AuthorDate: Mon Apr 20 21:29:30 2020 +1000

    GROOVY-8774: refine test
---
 .../org/codehaus/groovy/tools/stubgenerator/Groovy8774Bug.groovy    | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/test/org/codehaus/groovy/tools/stubgenerator/Groovy8774Bug.groovy b/src/test/org/codehaus/groovy/tools/stubgenerator/Groovy8774Bug.groovy
index dcf5957..46dd03e 100644
--- a/src/test/org/codehaus/groovy/tools/stubgenerator/Groovy8774Bug.groovy
+++ b/src/test/org/codehaus/groovy/tools/stubgenerator/Groovy8774Bug.groovy
@@ -26,7 +26,7 @@ class Groovy8774Bug extends StringSourcesStubTestCase {
                     public interface Dummy { }
                 ''',
                 'test/package-info.groovy': '''
-                    @groovy.transform.Generated
+                    @java.lang.Deprecated
                     package test
                 '''
         ]
@@ -38,7 +38,9 @@ class Groovy8774Bug extends StringSourcesStubTestCase {
 //    }
 
     void verifyStubs() {
-        assert stubJavaSourceFor('test/package-info').contains('@groovy.transform.Generated')
+        assert stubJavaSourceFor('test/package-info').contains('@java.lang.Deprecated')
         assert stubJavaSourceFor('test/package-info').contains('package test;')
+        def piClass = loader.loadClass('test.package-info')
+        assert piClass.isInterface()
     }
 }


[groovy] 02/02: GROOVY-4554: add test for case known to work

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 c5ff3757e87f8bc549c917e60db3815488c170eb
Author: Paul King <pa...@asert.com.au>
AuthorDate: Mon Apr 20 21:30:41 2020 +1000

    GROOVY-4554: add test for case known to work
---
 .../tools/stubgenerator/Groovy4554Bug.groovy       | 44 ++++++++++++++++++++++
 1 file changed, 44 insertions(+)

diff --git a/src/test/org/codehaus/groovy/tools/stubgenerator/Groovy4554Bug.groovy b/src/test/org/codehaus/groovy/tools/stubgenerator/Groovy4554Bug.groovy
new file mode 100644
index 0000000..1700e18
--- /dev/null
+++ b/src/test/org/codehaus/groovy/tools/stubgenerator/Groovy4554Bug.groovy
@@ -0,0 +1,44 @@
+/*
+ *  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 org.codehaus.groovy.tools.stubgenerator
+
+class Groovy4554Bug extends StringSourcesStubTestCase {
+
+    Map<String, String> provideSources() {
+        [
+                'Dummy.groovy': '''
+                    interface Dummy { }
+                ''',
+                'test/package-info.java': '''
+                    @java.lang.Deprecated
+                    package test;
+                '''
+        ]
+    }
+
+//    protected void init() {
+//        debug = true
+//        delete = false
+//    }
+
+    void verifyStubs() {
+        def piClass = loader.loadClass('test.package-info')
+        assert piClass.isInterface()
+    }
+}