groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pascalschumac...@apache.org
Subject groovy git commit: remove printlns and commented-out code from NegateListsTest
Date Sat, 20 Feb 2016 11:04:55 GMT
Repository: groovy
Updated Branches:
  refs/heads/master 795667abe -> eabda11f0


remove printlns and commented-out code from NegateListsTest


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

Branch: refs/heads/master
Commit: eabda11f0c3eac7e483e1b7da434ba34e2a3d82c
Parents: 795667a
Author: pascalschumacher <pascalschumacher@gmx.net>
Authored: Sat Feb 20 12:03:45 2016 +0100
Committer: pascalschumacher <pascalschumacher@gmx.net>
Committed: Sat Feb 20 12:03:45 2016 +0100

----------------------------------------------------------------------
 src/test/groovy/operator/NegateListsTest.groovy | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/eabda11f/src/test/groovy/operator/NegateListsTest.groovy
----------------------------------------------------------------------
diff --git a/src/test/groovy/operator/NegateListsTest.groovy b/src/test/groovy/operator/NegateListsTest.groovy
index e66ab5d..13c768c 100644
--- a/src/test/groovy/operator/NegateListsTest.groovy
+++ b/src/test/groovy/operator/NegateListsTest.groovy
@@ -56,19 +56,16 @@ class NegateListsTest extends GroovyTestCase {
     void testEvenFunction() {
         def PI = Math.PI
 
-        /////////////////////////////////////////////////////////////////////
         // A case of partition having 10 subintervals.
         // x = [0.0*PI/2, 0.1*PI/2, 0.2*PI/2, 0.3*PI/2, 0.4*PI/2, 0.5*PI/2, 
         //               0.6*PI/2, 0.7*PI/2, 0.8*PI/2, 0.9*PI/2, 1.0*PI/2]
 
-        /////////////////////////////////////////////////////////////////////
         // Generate a domain of function used om testing.
         def n = 1000    // the number of partitions for the interval 0..2/PI
         def x = []
         for (i in 0..n) {
             x << i*PI/n
         }
-        // println x
 
         def cos = { Math.cos(it) }
         assertTrue(isEvenFn(cos, x))
@@ -81,16 +78,10 @@ class NegateListsTest extends GroovyTestCase {
     }
 
     boolean isEvenFn(f, domain) {
-        // println domain.collect(f)
-        // println( (-domain).collect(f) )
-        println( (domain.collect(f)) == ((-domain).collect(f)) )
-        return (domain.collect(f)) == ((-domain).collect(f))
+        domain.collect(f) == ((-domain).collect(f))
     }
 
     boolean isOddFn(f, domain) {
-        // println domain.collect(f)
-        // println(  (-domain).collect(f) )
-        println( domain.collect(f) == -((-domain).collect(f)) )
-        return domain.collect(f) == -((-domain).collect(f))
+        domain.collect(f) == -((-domain).collect(f))
     }
 }
\ No newline at end of file


Mime
View raw message