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/11/09 02:24:32 UTC
[groovy] branch master updated: Tweak doco
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 2161c2e Tweak doco
2161c2e is described below
commit 2161c2e507bf39a08db8dd6e98e3c95a6df70b3c
Author: Daniel Sun <su...@apache.org>
AuthorDate: Mon Nov 9 10:23:49 2020 +0800
Tweak doco
---
.../src/spec/test/org/apache/groovy/ginq/GinqTest.groovy | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
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 96cdd5c..b51f564 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
@@ -2348,9 +2348,11 @@ class GinqTest {
@Test
void "testGinq - from iterable - 0"() {
assertScript '''
+ assert [1, 2, 3] == GQ {
// tag::ginq_datasource_03[]
- assert [1, 2, 3] == GQ {from n in [1, 2, 3] select n}.toList()
+ from n in [1, 2, 3] select n
// end::ginq_datasource_03[]
+ }.toList()
'''
}
@@ -2365,18 +2367,22 @@ class GinqTest {
@Test
void "testGinq - from stream - 1"() {
assertScript '''
+ assert [1, 2, 3] == GQ {
// tag::ginq_datasource_01[]
- assert [1, 2, 3] == GQ {from n in [1, 2, 3].stream() select n}.toList()
+ from n in [1, 2, 3].stream() select n
// end::ginq_datasource_01[]
+ }.toList()
'''
}
@Test
void "testGinq - from array - 0"() {
assertScript '''
+ assert [1, 2, 3] == GQ {
// tag::ginq_datasource_02[]
- assert [1, 2, 3] == GQ {from n in new int[] {1, 2, 3} select n}.toList()
+ from n in new int[] {1, 2, 3} select n
// end::ginq_datasource_02[]
+ }.toList()
'''
}