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:14:45 UTC

[groovy] branch master updated: Add one more test for `clone` array

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

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


The following commit(s) were added to refs/heads/master by this push:
     new ce15eaef34 Add one more test for `clone` array
ce15eaef34 is described below

commit ce15eaef34d7d77d0186dd82f7132e6644ad8761
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
+        '''
+    }
 }