diff --git a/src/test/java/org/apache/commons/math/stat/descriptive/MultivariateSummaryStatisticsTest.java b/src/test/java/org/apache/commons/math/stat/descriptive/MultivariateSummaryStatisticsTest.java index fbad1efee..bf6e23d41 100644 --- a/src/test/java/org/apache/commons/math/stat/descriptive/MultivariateSummaryStatisticsTest.java +++ b/src/test/java/org/apache/commons/math/stat/descriptive/MultivariateSummaryStatisticsTest.java @@ -87,16 +87,17 @@ public class MultivariateSummaryStatisticsTest extends TestCase { stats.addValue(new double[] {3, 1}); Locale d = Locale.getDefault(); Locale.setDefault(Locale.US); - assertEquals("MultivariateSummaryStatistics:\n" + - "n: 3\n" + - "min: 1.0, 1.0\n" + - "max: 3.0, 3.0\n" + - "mean: 2.0, 2.0\n" + - "geometric mean: 1.817..., 1.817...\n" + - "sum of squares: 14.0, 14.0\n" + - "sum of logarithms: 1.791..., 1.791...\n" + - "standard deviation: 1.0, 1.0\n" + - "covariance: Array2DRowRealMatrix{{1.0,-1.0},{-1.0,1.0}}\n", + final String suffix = System.getProperty("line.separator"); + assertEquals("MultivariateSummaryStatistics:" + suffix+ + "n: 3" +suffix+ + "min: 1.0, 1.0" +suffix+ + "max: 3.0, 3.0" +suffix+ + "mean: 2.0, 2.0" +suffix+ + "geometric mean: 1.817..., 1.817..." +suffix+ + "sum of squares: 14.0, 14.0" +suffix+ + "sum of logarithms: 1.791..., 1.791..." +suffix+ + "standard deviation: 1.0, 1.0" +suffix+ + "covariance: Array2DRowRealMatrix{{1.0,-1.0},{-1.0,1.0}}" +suffix, stats.toString().replaceAll("([0-9]+\\.[0-9][0-9][0-9])[0-9]+", "$1...")); Locale.setDefault(d); }