From 9923564810d35b43e53bc5328c1adfc0f4de0bbb Mon Sep 17 00:00:00 2001 From: Sebastian Bazley Date: Sun, 23 Jan 2011 00:52:34 +0000 Subject: [PATCH] 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 --- .../java/org/apache/commons/math/util/FastMathTest.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/test/java/org/apache/commons/math/util/FastMathTest.java b/src/test/java/org/apache/commons/math/util/FastMathTest.java index dae04aff3..6cf412376 100644 --- a/src/test/java/org/apache/commons/math/util/FastMathTest.java +++ b/src/test/java/org/apache/commons/math/util/FastMathTest.java @@ -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); }