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 2021/07/25 13:40:12 UTC
[groovy] branch master updated: Add 1 more test for GINQ
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 f82e15e Add 1 more test for GINQ
f82e15e is described below
commit f82e15efaf298d181713c77abf7fda841f5ac302
Author: Daniel Sun <su...@apache.org>
AuthorDate: Sun Jul 25 21:39:43 2021 +0800
Add 1 more test for GINQ
---
.../test/org/apache/groovy/ginq/GinqTest.groovy | 21 +++++++++++++++++++++
1 file changed, 21 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 a15d946..fee5e33 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
@@ -6322,6 +6322,27 @@ class GinqTest {
'''
}
+ @Test
+ void "testGinqMethod - GQ - 11"() {
+ assertScript '''
+ import groovy.ginq.transform.GQ
+
+ class GinqClass {
+ private static final int F = 6
+ private int e = 3
+
+ @GQ
+ def ginq(b) {
+ from n in [1, 2, 3]
+ where b < n && n < e
+ select n + F
+ }
+ }
+
+ assert [8] == new GinqClass().ginq(1).toList()
+ '''
+ }
+
@AfterClass
static void "testGinq - shutdown - 0"() {
assertScript '''