This is an automated email from the ASF dual-hosted git repository. aherbert pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-math.git
The following commit(s) were added to refs/heads/master by this push: new 58e0efc Sonarfix: Rename test for equality in markers 58e0efc is described below commit 58e0efc651e746dbdf410708506b4647e03fa178 Author: Alex Herbert <aherb...@apache.org> AuthorDate: Wed Aug 18 08:26:14 2021 +0100 Sonarfix: Rename test for equality in markers Use explicit equals method to check equality (not assertEquals) --- .../legacy/stat/descriptive/rank/PSquarePercentileTest.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/stat/descriptive/rank/PSquarePercentileTest.java b/commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/stat/descriptive/rank/PSquarePercentileTest.java index 40c4c75..6108794 100644 --- a/commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/stat/descriptive/rank/PSquarePercentileTest.java +++ b/commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/stat/descriptive/rank/PSquarePercentileTest.java @@ -22,8 +22,9 @@ import java.util.Arrays; import java.util.HashSet; import java.util.Iterator; import java.util.LinkedHashSet; +import java.util.List; import java.util.Set; - +import java.util.stream.Collectors; import org.apache.commons.statistics.distribution.LogNormalDistribution; import org.apache.commons.statistics.distribution.NormalDistribution; import org.apache.commons.statistics.distribution.ContinuousDistribution; @@ -123,8 +124,10 @@ public class PSquarePercentileTest extends (int) (testArray.length - index)); replica.incrementAll(testArray, (int) index, (int) (testArray.length - index)); - Assert.assertEquals(master, master); - Assert.assertEquals(replica, replica); + // Check same + // Explicit test of the equals method + Assert.assertTrue(master.equals(master)); + Assert.assertTrue(replica.equals(replica)); Assert.assertEquals(replica, master); Assert.assertEquals(master, replica); } @@ -139,7 +142,7 @@ public class PSquarePercentileTest extends } @Test - public void testMiscellaniousFunctionsInMarkers() { + public void testEqualsInMarkers() { double p = 0.5; PSquareMarkers markers = PSquarePercentile.newMarkers(