You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by em...@apache.org on 2021/03/30 15:09:36 UTC

[groovy] branch GROOVY_2_5_X updated (ca6e109 -> c04c34b)

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

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


    from ca6e109  GROOVY-9906: check index before comparing parameters
     new de6c5ab  GROOVY-7978: add test case
     new c04c34b  GROOVY-7989: add test case

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:
 .../bugs/{Groovy6996.groovy => Groovy7978.groovy}  | 47 +++++++++++-----------
 .../{Groovy5285Bug.groovy => Groovy7989.groovy}    | 20 +++++----
 2 files changed, 35 insertions(+), 32 deletions(-)
 copy src/test/groovy/bugs/{Groovy6996.groovy => Groovy7978.groovy} (54%)
 copy src/test/groovy/bugs/{Groovy5285Bug.groovy => Groovy7989.groovy} (75%)

[groovy] 02/02: GROOVY-7989: add test case

Posted by em...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

emilles pushed a commit to branch GROOVY_2_5_X
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit c04c34bafd7c98a91b7b35b2c58d107ae972d987
Author: Eric Milles <er...@thomsonreuters.com>
AuthorDate: Tue Mar 30 09:33:33 2021 -0500

    GROOVY-7989: add test case
---
 src/test/groovy/bugs/Groovy7989.groovy | 38 ++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/src/test/groovy/bugs/Groovy7989.groovy b/src/test/groovy/bugs/Groovy7989.groovy
new file mode 100644
index 0000000..c91b1c1
--- /dev/null
+++ b/src/test/groovy/bugs/Groovy7989.groovy
@@ -0,0 +1,38 @@
+/*
+ *  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.bugs
+
+import org.junit.Test
+
+import static groovy.test.GroovyAssert.assertScript
+
+final class Groovy7989 {
+    @Test
+    void testListCloneInStaticInitializer() {
+        assertScript '''
+            class Main {
+                static {
+                    List list = []
+                    list.clone()
+                }
+            }
+            new Main()
+        '''
+    }
+}

[groovy] 01/02: GROOVY-7978: add test case

Posted by em...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

emilles pushed a commit to branch GROOVY_2_5_X
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit de6c5ab39ae6feae0722fb5e342e1ed301a4845a
Author: Eric Milles <er...@thomsonreuters.com>
AuthorDate: Tue Mar 30 09:20:11 2021 -0500

    GROOVY-7978: add test case
---
 src/test/groovy/bugs/Groovy7978.groovy | 58 ++++++++++++++++++++++++++++++++++
 1 file changed, 58 insertions(+)

diff --git a/src/test/groovy/bugs/Groovy7978.groovy b/src/test/groovy/bugs/Groovy7978.groovy
new file mode 100644
index 0000000..44c5dfb
--- /dev/null
+++ b/src/test/groovy/bugs/Groovy7978.groovy
@@ -0,0 +1,58 @@
+/*
+ *  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.bugs
+
+import org.junit.Test
+
+import static groovy.test.GroovyAssert.assertScript
+
+final class Groovy7978 {
+
+    @Test
+    void testPreIncrementInAssert() {
+        ['', '@groovy.transform.TypeChecked', '@groovy.transform.CompileStatic'].each { annotaion ->
+            assertScript """
+                $annotaion
+                class Main {
+                    private int counter = 0
+                    void test() {
+                        assert (++this.counter)
+                    }
+                }
+                new Main().test()
+            """
+        }
+    }
+
+    @Test
+    void testPostIncrementInAssert() {
+        ['', '@groovy.transform.TypeChecked', '@groovy.transform.CompileStatic'].each { annotaion ->
+            assertScript """
+                $annotaion
+                class Main {
+                    private int counter = 0
+                    void test() {
+                        assert !(this.counter++)
+                    }
+                }
+                new Main().test()
+            """
+        }
+    }
+}