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/04/07 13:30:50 UTC

[07/50] [abbrv] groovy git commit: GROOVY-8109: Unsupported operator with @CompileStatic causes BUG! () during compilation - add test (closes #509)

GROOVY-8109: Unsupported operator with @CompileStatic causes BUG! () during compilation - add test (closes #509)


Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/988c3865
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/988c3865
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/988c3865

Branch: refs/heads/parrot
Commit: 988c3865ed8e725c6cdfeb82d4c1c983a3135042
Parents: 8303729
Author: paulk <pa...@asert.com.au>
Authored: Wed Mar 8 15:46:57 2017 +1000
Committer: paulk <pa...@asert.com.au>
Committed: Wed Mar 8 15:46:57 2017 +1000

----------------------------------------------------------------------
 src/test/groovy/EqualsTest.groovy | 31 ++++++++++++++++++++++++++-----
 1 file changed, 26 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/988c3865/src/test/groovy/EqualsTest.groovy
----------------------------------------------------------------------
diff --git a/src/test/groovy/EqualsTest.groovy b/src/test/groovy/EqualsTest.groovy
index 8011ea9..1e3c612 100644
--- a/src/test/groovy/EqualsTest.groovy
+++ b/src/test/groovy/EqualsTest.groovy
@@ -18,6 +18,8 @@
  */
 package groovy
 
+import org.codehaus.groovy.control.MultipleCompilationErrorsException
+
 class EqualsTest extends GroovyShellTestCase {
 
     void testParentChildrenEquals() {
@@ -37,15 +39,34 @@ class EqualsTest extends GroovyShellTestCase {
         assert x != n
     }
 
-    void testIdentical() {
-        shouldFail {
+    // until Parrot is merged
+    void testNotIdentical() {
+        def msg = shouldFail(MultipleCompilationErrorsException) {
             shell.evaluate """
-                    def x = []
-                    def y = []
-
+                def x = []
+                def y = []
+                def doIt() {
                     assert y !== x
+                }
+                doIt()
             """
         }
+        assert msg.contains("!==") && msg.contains("not supported")
     }
 
+    // until Parrot is merged
+    void testIdenticalCompileStatic() {
+        def msg = shouldFail(MultipleCompilationErrorsException) {
+            shell.evaluate """
+                def x = []
+                def y = []
+                @groovy.transform.CompileStatic
+                def doIt() {
+                    assert y === x
+                }
+                doIt()
+            """
+        }
+        assert msg.contains("===") && msg.contains("not supported")
+    }
 }