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 2017/12/13 06:38:09 UTC
groovy git commit: Exclude tests when running on pre-8 JVM
Repository: groovy
Updated Branches:
refs/heads/GROOVY_2_6_X 46309e8af -> f79639740
Exclude tests when running on pre-8 JVM
Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/f7963974
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/f7963974
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/f7963974
Branch: refs/heads/GROOVY_2_6_X
Commit: f79639740cb95f618f0889e94a5b8f196f1fd210
Parents: 46309e8
Author: sunlan <su...@apache.org>
Authored: Wed Dec 13 14:37:58 2017 +0800
Committer: sunlan <su...@apache.org>
Committed: Wed Dec 13 14:37:58 2017 +0800
----------------------------------------------------------------------
.../groovy/transform/stc/MethodCallsSTCTest.groovy | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/groovy/blob/f7963974/src/test/groovy/transform/stc/MethodCallsSTCTest.groovy
----------------------------------------------------------------------
diff --git a/src/test/groovy/transform/stc/MethodCallsSTCTest.groovy b/src/test/groovy/transform/stc/MethodCallsSTCTest.groovy
index 74c2095..1bf3d68 100644
--- a/src/test/groovy/transform/stc/MethodCallsSTCTest.groovy
+++ b/src/test/groovy/transform/stc/MethodCallsSTCTest.groovy
@@ -27,6 +27,18 @@ import org.codehaus.groovy.control.customizers.ImportCustomizer
* @author Cedric Champeau
*/
class MethodCallsSTCTest extends StaticTypeCheckingTestCase {
+ private static final boolean IS_PRE_8
+
+ static {
+ try {
+ Class.forName("java.util.function.Predicate")
+ IS_PRE_8 = false
+ } catch (ClassNotFoundException e) {
+ IS_PRE_8 = true
+ }
+
+ }
+
@Override
protected void configure() {
final ImportCustomizer ic = new ImportCustomizer()
@@ -454,6 +466,8 @@ class MethodCallsSTCTest extends StaticTypeCheckingTestCase {
}
void testGroovy8241() {
+ if (IS_PRE_8) return
+
assertScript '''
import java.util.function.Predicate
@@ -480,6 +494,8 @@ class MethodCallsSTCTest extends StaticTypeCheckingTestCase {
}
void testGroovy7061ex2() {
+ if (IS_PRE_8) return
+
assertScript '''
def doIt(List<String> strings) {
return strings.