[28/50] groovy git commit: Add more test cases for the standard "for" loop statement

2017-04-10 Thread paulk
Add more test cases for the standard "for" loop statement


Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/a033231e
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/a033231e
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/a033231e

Branch: refs/heads/master
Commit: a033231e223bc7fec108773bec200c5cfb33195b
Parents: 4e3b987
Author: sunlan 
Authored: Sat Jan 28 23:00:51 2017 +0800
Committer: sunlan 
Committed: Sat Jan 28 23:00:51 2017 +0800

--
 .../src/test/resources/core/For_05x.groovy  | 20 ++--
 1 file changed, 18 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/groovy/blob/a033231e/subprojects/groovy-parser-antlr4/src/test/resources/core/For_05x.groovy
--
diff --git 
a/subprojects/groovy-parser-antlr4/src/test/resources/core/For_05x.groovy 
b/subprojects/groovy-parser-antlr4/src/test/resources/core/For_05x.groovy
index fe55805..959d2c0 100644
--- a/subprojects/groovy-parser-antlr4/src/test/resources/core/For_05x.groovy
+++ b/subprojects/groovy-parser-antlr4/src/test/resources/core/For_05x.groovy
@@ -6,8 +6,16 @@ def testCS() {
 for (int i = 0, n = 5; i < n; i++) {
 result += i
 }
-
 assert 10 == result
+
+result = 0;
+int i;
+int j;
+for (i = 1, j = 5; i < j; i++, j--) {
+result += i;
+result += j;
+}
+assert 12 == result
 }
 testCS();
 
@@ -16,7 +24,15 @@ def test() {
 for (int i = 0, n = 5; i < n; i++) {
 result += i
 }
-
 assert 10 == result
+
+result = 0;
+int i;
+int j;
+for (i = 1, j = 5; i < j; i++, j--) {
+result += i;
+result += j;
+}
+assert 12 == result
 }
 test();



groovy git commit: Add more test cases for the standard "for" loop statement

2017-01-28 Thread sunlan
Repository: groovy
Updated Branches:
  refs/heads/parrot 4e3b987aa -> a033231e2


Add more test cases for the standard "for" loop statement


Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/a033231e
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/a033231e
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/a033231e

Branch: refs/heads/parrot
Commit: a033231e223bc7fec108773bec200c5cfb33195b
Parents: 4e3b987
Author: sunlan 
Authored: Sat Jan 28 23:00:51 2017 +0800
Committer: sunlan 
Committed: Sat Jan 28 23:00:51 2017 +0800

--
 .../src/test/resources/core/For_05x.groovy  | 20 ++--
 1 file changed, 18 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/groovy/blob/a033231e/subprojects/groovy-parser-antlr4/src/test/resources/core/For_05x.groovy
--
diff --git 
a/subprojects/groovy-parser-antlr4/src/test/resources/core/For_05x.groovy 
b/subprojects/groovy-parser-antlr4/src/test/resources/core/For_05x.groovy
index fe55805..959d2c0 100644
--- a/subprojects/groovy-parser-antlr4/src/test/resources/core/For_05x.groovy
+++ b/subprojects/groovy-parser-antlr4/src/test/resources/core/For_05x.groovy
@@ -6,8 +6,16 @@ def testCS() {
 for (int i = 0, n = 5; i < n; i++) {
 result += i
 }
-
 assert 10 == result
+
+result = 0;
+int i;
+int j;
+for (i = 1, j = 5; i < j; i++, j--) {
+result += i;
+result += j;
+}
+assert 12 == result
 }
 testCS();
 
@@ -16,7 +24,15 @@ def test() {
 for (int i = 0, n = 5; i < n; i++) {
 result += i
 }
-
 assert 10 == result
+
+result = 0;
+int i;
+int j;
+for (i = 1, j = 5; i < j; i++, j--) {
+result += i;
+result += j;
+}
+assert 12 == result
 }
 test();