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 2020/02/14 20:49:16 UTC
[groovy] branch GROOVY_3_0_X updated: Sync the missing test case
This is an automated email from the ASF dual-hosted git repository.
sunlan pushed a commit to branch GROOVY_3_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git
The following commit(s) were added to refs/heads/GROOVY_3_0_X by this push:
new 602a782 Sync the missing test case
602a782 is described below
commit 602a782ea7bb409c2afd2a7541ad102066cef74e
Author: Daniel Sun <su...@apache.org>
AuthorDate: Sat Feb 15 04:48:55 2020 +0800
Sync the missing test case
---
src/test/groovy/transform/stc/STCAssignmentTest.groovy | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/src/test/groovy/transform/stc/STCAssignmentTest.groovy b/src/test/groovy/transform/stc/STCAssignmentTest.groovy
index cb688cc..ace7882 100644
--- a/src/test/groovy/transform/stc/STCAssignmentTest.groovy
+++ b/src/test/groovy/transform/stc/STCAssignmentTest.groovy
@@ -138,6 +138,21 @@ class STCAssignmentTest extends StaticTypeCheckingTestCase {
'''
}
+ void testPlusEqualsOnProperty() {
+ assertScript '''
+ class C {
+ int i
+
+ static main(args) {
+ def c = new C()
+ c.i = 5
+ c.i += 10
+ assert c.i == 15
+ }
+ }
+ '''
+ }
+
// GROOVY-9385
void testPlusEqualsOnPrivateField() {
assertScript '''