Repository: groovy
Updated Branches:
  refs/heads/master 9f94ce36a -> 67f2d4cb9


test cleanup: remove done todos


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

Branch: refs/heads/master
Commit: 67f2d4cb9298642d31b945b44a706a8c415f319e
Parents: 9f94ce3
Author: John Wagenleitner <jwagenleit...@apache.org>
Authored: Tue Jul 19 18:10:21 2016 -0700
Committer: John Wagenleitner <jwagenleit...@apache.org>
Committed: Tue Jul 19 18:10:21 2016 -0700

----------------------------------------------------------------------
 src/test/groovy/MultiDimArraysTest.groovy              |  2 +-
 src/test/groovy/PrimitiveTypeFieldTest.groovy          |  2 +-
 ...PrivateVariableAccessFromAnotherInstanceTest.groovy |  8 ++++----
 src/test/groovy/Property2Test.groovy                   |  3 +--
 src/test/groovy/SomeClass.java                         |  2 +-
 src/test/groovy/VarargsMethodTest.groovy               | 13 ++++++-------
 src/test/groovy/bugs/Groovy1018_Bug.groovy             |  8 ++------
 src/test/groovy/bugs/Groovy1059_Bug.groovy             |  9 +--------
 8 files changed, 17 insertions(+), 30 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/67f2d4cb/src/test/groovy/MultiDimArraysTest.groovy
----------------------------------------------------------------------
diff --git a/src/test/groovy/MultiDimArraysTest.groovy 
b/src/test/groovy/MultiDimArraysTest.groovy
index 313fcfc..ee32286 100644
--- a/src/test/groovy/MultiDimArraysTest.groovy
+++ b/src/test/groovy/MultiDimArraysTest.groovy
@@ -25,10 +25,10 @@ package groovy
  */
 class MultiDimArraysTest extends GroovyTestCase {
 
-    // todo: enable as soon as multi dims are supported
     void testCallTwoDimStringArray() {
         def someArrayOfStringArrays = new SomeClass().anArrayOfStringArrays()
         assert 1 == someArrayOfStringArrays.size()
+        assert someArrayOfStringArrays[0][0] == 'whatever'
     }
 
     void testCallTwoDimStringArrayWorkaround() {

http://git-wip-us.apache.org/repos/asf/groovy/blob/67f2d4cb/src/test/groovy/PrimitiveTypeFieldTest.groovy
----------------------------------------------------------------------
diff --git a/src/test/groovy/PrimitiveTypeFieldTest.groovy 
b/src/test/groovy/PrimitiveTypeFieldTest.groovy
index 0ad3389..1b9f752 100644
--- a/src/test/groovy/PrimitiveTypeFieldTest.groovy
+++ b/src/test/groovy/PrimitiveTypeFieldTest.groovy
@@ -44,7 +44,7 @@ class PrimitiveTypeFieldTest extends GroovyTestCase {
         assert bugMethod(123) == 246
         assert bugMethod2(123) == 246
 
-        // @todo GROOVY-133
+        // GROOVY-133
         def closure = {int x-> x * 2 }
         assert closure.call(123) == 246
 

http://git-wip-us.apache.org/repos/asf/groovy/blob/67f2d4cb/src/test/groovy/PrivateVariableAccessFromAnotherInstanceTest.groovy
----------------------------------------------------------------------
diff --git 
a/src/test/groovy/PrivateVariableAccessFromAnotherInstanceTest.groovy 
b/src/test/groovy/PrivateVariableAccessFromAnotherInstanceTest.groovy
index b79d8dd..196baab 100644
--- a/src/test/groovy/PrivateVariableAccessFromAnotherInstanceTest.groovy
+++ b/src/test/groovy/PrivateVariableAccessFromAnotherInstanceTest.groovy
@@ -44,10 +44,10 @@ class PrivateVariableAccessFromAnotherInstanceTest extends 
GroovyTestCase implem
     
     void testClone() {
         def fred = new PrivateVariableAccessFromAnotherInstanceTest()
-        //@todo fails due to private access to 'bar'
-        //barney = fred.clone()
 
-        // TODO identity comparison
-        //assert !(barney === fred)
+        def barney = fred.clone()
+
+
+        assert !(barney.is(fred))
     }
 } 

http://git-wip-us.apache.org/repos/asf/groovy/blob/67f2d4cb/src/test/groovy/Property2Test.groovy
----------------------------------------------------------------------
diff --git a/src/test/groovy/Property2Test.groovy 
b/src/test/groovy/Property2Test.groovy
index 610d5da..e098f81 100644
--- a/src/test/groovy/Property2Test.groovy
+++ b/src/test/groovy/Property2Test.groovy
@@ -32,8 +32,7 @@ class Property2Test extends GroovyTestCase {
         // these are the properties and their values that should be there
         def props = ['name': 'James', 'count': 1, 'location': 'London', 
'blah': 9]
         foo.properties.each { name, value ->
-            // todo: GROOVY-996
-            // We should see protected properties, but not  private ones.
+            // GROOVY-996 - We should see protected properties, but not  
private ones.
             assert name != "invisible"
 
             def pvalue = props[name]

http://git-wip-us.apache.org/repos/asf/groovy/blob/67f2d4cb/src/test/groovy/SomeClass.java
----------------------------------------------------------------------
diff --git a/src/test/groovy/SomeClass.java b/src/test/groovy/SomeClass.java
index 71f5483..0449860 100644
--- a/src/test/groovy/SomeClass.java
+++ b/src/test/groovy/SomeClass.java
@@ -25,7 +25,7 @@ package groovy;
  */
 
 public class SomeClass {
-    // currently not supported to be called from Groovy
+
     public String[][] anArrayOfStringArrays() {
         return new String[][]{{"whatever"}};
     }

http://git-wip-us.apache.org/repos/asf/groovy/blob/67f2d4cb/src/test/groovy/VarargsMethodTest.groovy
----------------------------------------------------------------------
diff --git a/src/test/groovy/VarargsMethodTest.groovy 
b/src/test/groovy/VarargsMethodTest.groovy
index 6a64811..c3ea6ec 100644
--- a/src/test/groovy/VarargsMethodTest.groovy
+++ b/src/test/groovy/VarargsMethodTest.groovy
@@ -40,20 +40,19 @@ class VarargsMethodTest extends GroovyTestCase {
         assertEquals 2, varargsOnlyMethod( ['',''] as Object[])  
         assertEquals 2, varargsOnlyMethod( *['',''] )  
 
-        // todo: GROOVY-1023
+        // GROOVY-1023
         assertEquals 0, varargsOnlyMethod()
 
-        // todo: GROOVY-1026
+        // GROOVY-1026
         assertEquals(-1, varargsOnlyMethod(null))
         assertEquals(2, varargsOnlyMethod(null, null))
      }  
 
      Integer varargsOnlyMethod(Object[] args) {  
-         println("args = " + args)
-         // (1) todo: GROOVY-1023 (Java 5 feature)
+         // GROOVY-1023 (Java 5 feature)
          //     If this method having varargs is invoked with no parameter,
          //     then args is not null, but an array of length 0.
-         // (2) todo: GROOVY-1026 (Java 5 feature)
+         // GROOVY-1026 (Java 5 feature)
          //     If this method having varargs is invoked with one parameter
          //     null, then args is null, and so -1 is returned here.
          if (args == null)
@@ -70,13 +69,13 @@ class VarargsMethodTest extends GroovyTestCase {
          assertEquals 2, varargsLastMethod('', ['',''] as Object[])  
          assertEquals 2, varargsLastMethod('', *['',''] )  
 
-         // todo: GROOVY-1026
+         // GROOVY-1026
          assertEquals(-1, varargsLastMethod('',null))
          assertEquals(2, varargsLastMethod('',null, null))
      }  
   
      Integer varargsLastMethod(Object first, Object[] args) {  
-         // (1) todo: GROOVY-1026 (Java 5 feature)
+         // GROOVY-1026 (Java 5 feature)
          //     If this method having varargs is invoked with two parameters
          //     1 and null, then args is null, and so -1 is returned here.
          if (args == null)

http://git-wip-us.apache.org/repos/asf/groovy/blob/67f2d4cb/src/test/groovy/bugs/Groovy1018_Bug.groovy
----------------------------------------------------------------------
diff --git a/src/test/groovy/bugs/Groovy1018_Bug.groovy 
b/src/test/groovy/bugs/Groovy1018_Bug.groovy
index b4543fd..5e766d1 100644
--- a/src/test/groovy/bugs/Groovy1018_Bug.groovy
+++ b/src/test/groovy/bugs/Groovy1018_Bug.groovy
@@ -30,19 +30,15 @@ class Groovy1018_Bug extends GroovyTestCase {
 
     public static Object Class = "bar" 
 
-    // todo: GROOVY-1018
+    // GROOVY-1018
     void testGetPublicStaticField() {
         Groovy1018_Bug.Class = 'bar'
         def a = new Groovy1018_Bug()
-        println( a.Class )
-        println( a.@Class )
-        println( Groovy1018_Bug.Class )
-        println( Groovy1018_Bug.@Class )
         assert a.Class == "bar" && a.@Class == "bar"
         assert Groovy1018_Bug.Class == "bar" && Groovy1018_Bug.@Class == "bar"
     }
 
-    // todo: GROOVY-732
+    // GROOVY-732
     void testSetPublicStaticField() {
         Groovy1018_Bug.Class = 'bar-'
         assert Groovy1018_Bug.Class == "bar-" && Groovy1018_Bug.@Class == 
"bar-"

http://git-wip-us.apache.org/repos/asf/groovy/blob/67f2d4cb/src/test/groovy/bugs/Groovy1059_Bug.groovy
----------------------------------------------------------------------
diff --git a/src/test/groovy/bugs/Groovy1059_Bug.groovy 
b/src/test/groovy/bugs/Groovy1059_Bug.groovy
index 7bc595d..5385690 100644
--- a/src/test/groovy/bugs/Groovy1059_Bug.groovy
+++ b/src/test/groovy/bugs/Groovy1059_Bug.groovy
@@ -19,7 +19,7 @@
 package groovy.bugs
 
 /**
- * TODO: GROOVY-1059
+ * GROOVY-1059
  *
  *    Accessible to a closure attribute of an abject with the operator ".@".
  *    For examples, all of the expressions
@@ -40,13 +40,6 @@ class Groovy1059_Bug extends GroovyTestCase {
     void testClosureAsAttribute() {
         def x = new Groovy1059Foo()
 
-        println( x.say() )
-        println( (x.@say)() )
-        println( x.@say() )  // TODO: Groovy-1059 should work
-        println( x...@say.call() )
-        println( x.@say.doCall() )
-        println( x.@say2() )
-
         assert "I am a Method" == x.say()
         assert "I am a Method" == x.@say2()
         assert "I am a Closure" == (x.@say)()

Reply via email to