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 ef7ee6f  Tweak tests to cover both optimized and non-optimized GINQ 
further
ef7ee6f is described below

commit ef7ee6fdbdece4d1a5e8676d2d563410145b574e
Author: Daniel Sun <[email protected]>
AuthorDate: Wed Dec 9 12:42:17 2020 +0800

    Tweak tests to cover both optimized and non-optimized GINQ further
---
 .../src/spec/test/org/apache/groovy/ginq/GinqTest.groovy         | 9 ++++++---
 1 file changed, 6 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 850ef65..c4bec3f 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
@@ -3768,8 +3768,11 @@ class GinqTest {
     }
 
     private static void assertGinqScript(String script) {
-        assertScript(script)
-        String newScript = script.replace(/\bGQ\b/, 'GQ(optimize:false)')
-        assertScript(newScript)
+        String newScript = script.replaceAll(/\bGQ\s*[{]/, 'GQ(optimize:false) 
{')
+        [newScript, script].collect { String c ->
+            Thread.start {
+                assertScript(c)
+            }
+        }*.join()
     }
 }

Reply via email to