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:42 UTC
[groovy] 01/01: 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 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
+ '''
+ }
}