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 f77b06f  Add more tests
f77b06f is described below

commit f77b06fc5889f6bd839de8518e154f408f18752a
Author: Daniel Sun <[email protected]>
AuthorDate: Sun Nov 29 23:02:52 2020 +0800

    Add more tests
---
 .../test/org/apache/groovy/ginq/GinqTest.groovy    | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git 
a/subprojects/groovy-ginq/src/spec/test/org/apache/groovy/ginq/GinqTest.groovy 
b/subprojects/groovy-ginq/src/spec/test/org/apache/groovy/ginq/GinqTest.groovy
index 8548cac..8711d41 100644
--- 
a/subprojects/groovy-ginq/src/spec/test/org/apache/groovy/ginq/GinqTest.groovy
+++ 
b/subprojects/groovy-ginq/src/spec/test/org/apache/groovy/ginq/GinqTest.groovy
@@ -2223,6 +2223,28 @@ class GinqTest {
     }
 
     @Test
+    void "testGinq - from groupby select - 28"() {
+        assertScript '''
+            assert [[1, 3], [3, 5], [6, 9]] == GQ {
+                from n in [1, 1, 3, 3, 6, 6, 6]
+                groupby n
+                select n, n + count(n)
+            }.toList()
+        '''
+    }
+
+    @Test
+    void "testGinq - from groupby select - 29"() {
+        assertScript '''
+            assert [[1, 3], [3, 5], [6, 9]] == GQ {
+                from n in [1, 1, 3, 3, 6, 6, 6]
+                groupby n
+                select n, n + count(n) as nPlusCount
+            }.toList()
+        '''
+    }
+
+    @Test
     void "testGinq - from where groupby select - 1"() {
         assertScript '''
             assert [[1, 2], [6, 3]] == GQ {

Reply via email to