Should only test against public methods.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1062301 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sebastian Bazley 2011-01-23 00:52:34 +00:00
parent 6967590b83
commit 9923564810
1 changed files with 5 additions and 1 deletions

View File

@ -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);
}