Author: sebb
Date: Sun Jan 23 00:52:34 2011
New Revision: 1062301
URL: http://svn.apache.org/viewvc?rev=1062301&view=rev
Log:
Should only test against public methods.
Modified:
commons/proper/math/trunk/src/test/java/org/apache/commons/math/util/FastMathTest.java
Modified:
commons/proper/math/trunk/src/test/java/org/apache/commons/math/util/FastMathTest.java
URL:
http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/util/FastMathTest.java?rev=1062301&r1=1062300&r2=1062301&view=diff
==============================================================================
---
commons/proper/math/trunk/src/test/java/org/apache/commons/math/util/FastMathTest.java
(original)
+++
commons/proper/math/trunk/src/test/java/org/apache/commons/math/util/FastMathTest.java
Sun Jan 23 00:52:34 2011
@@ -1071,7 +1071,11 @@ public class FastMathTest {
String name = mathMethod.getName();
try {
fastMethod = FastMath.class.getDeclaredMethod(name,
(Class[]) params);
- comparer.compareSpecials(mathMethod, fastMethod,
params);
+ if (Modifier.isPublic(fastMethod.getModifiers())) {
+ comparer.compareSpecials(mathMethod, fastMethod,
params);
+ } else {
+ System.out.println("Cannot find public FastMath
method corresponding to: "+mathMethod);
+ }
} catch (NoSuchMethodException e) {
System.out.println("Cannot find FastMath method
corresponding to: "+mathMethod);
}