You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by su...@apache.org on 2022/08/28 09:01:41 UTC

[groovy] branch danielsun/clone-20220828 created (now 71bf08075d)

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

sunlan pushed a change to branch danielsun/clone-20220828
in repository https://gitbox.apache.org/repos/asf/groovy.git


      at 71bf08075d Add one more test for `clone` array

This branch includes the following new commits:

     new 71bf08075d Add one more test for `clone` array

The 1 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.



[groovy] 01/01: Add one more test for `clone` array

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

sunlan pushed a commit to branch danielsun/clone-20220828
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit 71bf08075de99315df10083fb7a547c0257d63d9
Author: Daniel Sun <su...@apache.org>
AuthorDate: Sun Aug 28 17:01:22 2022 +0800

    Add one more test for `clone` array
---
 src/test/groovy/bugs/Groovy9103.groovy | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/test/groovy/bugs/Groovy9103.groovy b/src/test/groovy/bugs/Groovy9103.groovy
index ab1be1a0c5..721344f0c6 100644
--- a/src/test/groovy/bugs/Groovy9103.groovy
+++ b/src/test/groovy/bugs/Groovy9103.groovy
@@ -69,4 +69,13 @@ final class Groovy9103 {
         Object obj = new Tuple1('abc')
         assert obj.clone()
     }
+
+    @Test
+    void testClone4() {
+        assertScript '''
+            int[] nums = [1, 2, 3]
+            int[] cloned = nums.clone()
+            assert nums == cloned
+        '''
+    }
 }