groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sun...@apache.org
Subject [1/2] groovy git commit: Fix some tests which have not been covered by Parrot before
Date Fri, 05 May 2017 12:28:05 GMT
Repository: groovy
Updated Branches:
  refs/heads/master e817651ad -> 6f41416f2


http://git-wip-us.apache.org/repos/asf/groovy/blob/6f41416f/subprojects/groovy-parser-antlr4/src/test/resources/fail/ClassDeclaration_01x.groovy
----------------------------------------------------------------------
diff --git a/subprojects/groovy-parser-antlr4/src/test/resources/fail/ClassDeclaration_01x.groovy
b/subprojects/groovy-parser-antlr4/src/test/resources/fail/ClassDeclaration_01x.groovy
new file mode 100644
index 0000000..d577c4b
--- /dev/null
+++ b/subprojects/groovy-parser-antlr4/src/test/resources/fail/ClassDeclaration_01x.groovy
@@ -0,0 +1,7 @@
+package fail
+
+class A {
+    String foo() {}
+    def foo() {}
+}
+new A()
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/groovy/blob/6f41416f/subprojects/groovy-parser-antlr4/src/test/resources/fail/ClosureListExpression_01.groovy
----------------------------------------------------------------------
diff --git a/subprojects/groovy-parser-antlr4/src/test/resources/fail/ClosureListExpression_01.groovy
b/subprojects/groovy-parser-antlr4/src/test/resources/fail/ClosureListExpression_01.groovy
new file mode 100644
index 0000000..6f93556
--- /dev/null
+++ b/subprojects/groovy-parser-antlr4/src/test/resources/fail/ClosureListExpression_01.groovy
@@ -0,0 +1 @@
+[].for(1;2;3){println "in loop"}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/groovy/blob/6f41416f/subprojects/groovy-parser-antlr4/src/test/resources/fail/ClosureListExpression_02.groovy
----------------------------------------------------------------------
diff --git a/subprojects/groovy-parser-antlr4/src/test/resources/fail/ClosureListExpression_02.groovy
b/subprojects/groovy-parser-antlr4/src/test/resources/fail/ClosureListExpression_02.groovy
new file mode 100644
index 0000000..ff953b9
--- /dev/null
+++ b/subprojects/groovy-parser-antlr4/src/test/resources/fail/ClosureListExpression_02.groovy
@@ -0,0 +1 @@
+def x = (1;2;3)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/groovy/blob/6f41416f/subprojects/groovy-parser-antlr4/src/test/resources/fail/ClosureListExpression_03.groovy
----------------------------------------------------------------------
diff --git a/subprojects/groovy-parser-antlr4/src/test/resources/fail/ClosureListExpression_03.groovy
b/subprojects/groovy-parser-antlr4/src/test/resources/fail/ClosureListExpression_03.groovy
new file mode 100644
index 0000000..59beda7
--- /dev/null
+++ b/subprojects/groovy-parser-antlr4/src/test/resources/fail/ClosureListExpression_03.groovy
@@ -0,0 +1 @@
+[].bar(1;2;3)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/groovy/blob/6f41416f/subprojects/groovy-parser-antlr4/src/test/resources/fail/ClosureListExpression_04.groovy
----------------------------------------------------------------------
diff --git a/subprojects/groovy-parser-antlr4/src/test/resources/fail/ClosureListExpression_04.groovy
b/subprojects/groovy-parser-antlr4/src/test/resources/fail/ClosureListExpression_04.groovy
new file mode 100644
index 0000000..738e0ac
--- /dev/null
+++ b/subprojects/groovy-parser-antlr4/src/test/resources/fail/ClosureListExpression_04.groovy
@@ -0,0 +1,10 @@
+class Crasher {
+    public void m() {
+        def fields = [1,2,3]
+        def expectedFieldNames = ["patentnumber", "status"].
+                for (int i=0; i<fields.size(); i++) {
+                    Object f = fields[i]
+                    System.out.println(f);
+                }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/groovy/blob/6f41416f/subprojects/groovy-parser-antlr4/src/test/resources/fail/ConstructorDeclaration_01.groovy
----------------------------------------------------------------------
diff --git a/subprojects/groovy-parser-antlr4/src/test/resources/fail/ConstructorDeclaration_01.groovy
b/subprojects/groovy-parser-antlr4/src/test/resources/fail/ConstructorDeclaration_01.groovy
new file mode 100644
index 0000000..1990412
--- /dev/null
+++ b/subprojects/groovy-parser-antlr4/src/test/resources/fail/ConstructorDeclaration_01.groovy
@@ -0,0 +1 @@
+class Foo { static final Foo() {}}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/groovy/blob/6f41416f/subprojects/groovy-parser-antlr4/src/test/resources/fail/InterfaceDeclaration_01.groovy
----------------------------------------------------------------------
diff --git a/subprojects/groovy-parser-antlr4/src/test/resources/fail/InterfaceDeclaration_01.groovy
b/subprojects/groovy-parser-antlr4/src/test/resources/fail/InterfaceDeclaration_01.groovy
new file mode 100644
index 0000000..30fc526
--- /dev/null
+++ b/subprojects/groovy-parser-antlr4/src/test/resources/fail/InterfaceDeclaration_01.groovy
@@ -0,0 +1,3 @@
+interface Foo {
+    def doit( String param = "Groovy", int o )
+}

http://git-wip-us.apache.org/repos/asf/groovy/blob/6f41416f/subprojects/groovy-parser-antlr4/src/test/resources/fail/MethodDeclaration_01.groovy
----------------------------------------------------------------------
diff --git a/subprojects/groovy-parser-antlr4/src/test/resources/fail/MethodDeclaration_01.groovy
b/subprojects/groovy-parser-antlr4/src/test/resources/fail/MethodDeclaration_01.groovy
new file mode 100644
index 0000000..438d97f
--- /dev/null
+++ b/subprojects/groovy-parser-antlr4/src/test/resources/fail/MethodDeclaration_01.groovy
@@ -0,0 +1,5 @@
+{ ->
+    def say(String msg) {
+        println(msg)
+    }
+}()

http://git-wip-us.apache.org/repos/asf/groovy/blob/6f41416f/subprojects/groovy-parser-antlr4/src/test/resources/fail/Modifier_07.groovy
----------------------------------------------------------------------
diff --git a/subprojects/groovy-parser-antlr4/src/test/resources/fail/Modifier_07.groovy b/subprojects/groovy-parser-antlr4/src/test/resources/fail/Modifier_07.groovy
new file mode 100644
index 0000000..320d66e
--- /dev/null
+++ b/subprojects/groovy-parser-antlr4/src/test/resources/fail/Modifier_07.groovy
@@ -0,0 +1 @@
+volatile x() {}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/groovy/blob/6f41416f/subprojects/groovy-parser-antlr4/src/test/resources/fail/Void_01x.groovy
----------------------------------------------------------------------
diff --git a/subprojects/groovy-parser-antlr4/src/test/resources/fail/Void_01x.groovy b/subprojects/groovy-parser-antlr4/src/test/resources/fail/Void_01x.groovy
new file mode 100644
index 0000000..1d1b56a
--- /dev/null
+++ b/subprojects/groovy-parser-antlr4/src/test/resources/fail/Void_01x.groovy
@@ -0,0 +1,3 @@
+class MyClass {
+    void field
+}

http://git-wip-us.apache.org/repos/asf/groovy/blob/6f41416f/subprojects/groovy-parser-antlr4/src/test/resources/fail/Void_02x.groovy
----------------------------------------------------------------------
diff --git a/subprojects/groovy-parser-antlr4/src/test/resources/fail/Void_02x.groovy b/subprojects/groovy-parser-antlr4/src/test/resources/fail/Void_02x.groovy
new file mode 100644
index 0000000..fe9848d
--- /dev/null
+++ b/subprojects/groovy-parser-antlr4/src/test/resources/fail/Void_02x.groovy
@@ -0,0 +1,5 @@
+class MyClass {
+    def foo() {
+        void bar = null
+    }
+}


Mime
View raw message