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/12/27 15:10:58 UTC
[groovy] branch master updated: Add one more test case
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 96e99f2 Add one more test case
96e99f2 is described below
commit 96e99f28d5019558c62043df3750aa2f601e2887
Author: Daniel Sun <su...@apache.org>
AuthorDate: Sun Dec 27 23:10:24 2020 +0800
Add one more test case
---
.../src/spec/test/org/apache/groovy/ginq/GinqTest.groovy | 10 ++++++++++
1 file changed, 10 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 2f29c6b..b62a14e 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
@@ -5193,6 +5193,16 @@ class GinqTest {
'''
}
+ @Test
+ void "testGinq - window - 46"() {
+ assertGinqScript '''
+ assert [[1, 0], [1, 1], [2, 2], [2, 3]] == GQ {
+ from n in [new Integer(1), new Integer(1), new Integer(2), new Integer(2)]
+ select n, (rowNumber() over(orderby n))
+ }.toList()
+ '''
+ }
+
private static void assertGinqScript(String script) {
String deoptimizedScript = script.replaceAll(/\bGQ\s*[{]/, 'GQ(optimize:false) {')
List<String> scriptList = [deoptimizedScript, script]