This is an automated email from the ASF dual-hosted git repository.
sunlan pushed a commit to branch GROOVY-8258
in repository https://gitbox.apache.org/repos/asf/groovy.git
The following commit(s) were added to refs/heads/GROOVY-8258 by this push:
new 1f759ad GROOVY-8258: add more test cases
1f759ad is described below
commit 1f759adbbe92228fd091b50fc23333858ba2e296
Author: Daniel Sun <[email protected]>
AuthorDate: Thu Oct 8 17:45:57 2020 +0800
GROOVY-8258: add more test cases
---
.../groovy/org/apache/groovy/linq/GinqTest.groovy | 28 +++++++++++++++++++---
1 file changed, 25 insertions(+), 3 deletions(-)
diff --git
a/subprojects/groovy-linq/src/test/groovy/org/apache/groovy/linq/GinqTest.groovy
b/subprojects/groovy-linq/src/test/groovy/org/apache/groovy/linq/GinqTest.groovy
index 09db9c4..0b4a043 100644
---
a/subprojects/groovy-linq/src/test/groovy/org/apache/groovy/linq/GinqTest.groovy
+++
b/subprojects/groovy-linq/src/test/groovy/org/apache/groovy/linq/GinqTest.groovy
@@ -1178,7 +1178,29 @@ class GinqTest {
}
@Test
- void "testGinq - from innerJoin orderBy select - 8"() {
+ void "testGinq - from orderBy select - 8"() {
+ assertScript '''
+ assert [1, 2, 5, 6] == GINQ {
+ from n in [1, 5, 2, 6]
+ orderBy 1 / n in desc
+ select n
+ }.toList()
+ '''
+ }
+
+ @Test
+ void "testGinq - from orderBy select - 9"() {
+ assertScript '''
+ assert [1, 2, 5, 6] == GINQ {
+ from n in [1, 5, 2, 6]
+ orderBy Math.pow(1 / n, 1) in desc
+ select n
+ }.toList()
+ '''
+ }
+
+ @Test
+ void "testGinq - from innerJoin orderBy select - 1"() {
assertScript '''
assert [2, 3] == GINQ {
from n1 in [1, 2, 3]
@@ -1191,7 +1213,7 @@ class GinqTest {
}
@Test
- void "testGinq - from innerJoin orderBy select - 9"() {
+ void "testGinq - from innerJoin orderBy select - 2"() {
assertScript '''
assert [3, 2] == GINQ {
from n1 in [1, 2, 3]
@@ -1204,7 +1226,7 @@ class GinqTest {
}
@Test
- void "testGinq - from innerJoin orderBy select - 10"() {
+ void "testGinq - from innerJoin orderBy select - 3"() {
assertScript '''
assert [[3, 3], [2, 2]] == GINQ {
from n1 in [1, 2, 3]