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:27:25 UTC
[groovy] branch GROOVY_4_0_X 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 GROOVY_4_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git
The following commit(s) were added to refs/heads/GROOVY_4_0_X by this push:
new 182c8fde09 Add one more test for `clone` array
182c8fde09 is described below
commit 182c8fde09e78ab219415e2a88503709be027dbc
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
+ '''
+ }
}