commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From billbar...@apache.org
Subject svn commit: r988777 - /commons/proper/math/trunk/src/test/java/org/apache/commons/math/stat/descriptive/MultivariateSummaryStatisticsTest.java
Date Wed, 25 Aug 2010 01:23:21 GMT
Author: billbarker
Date: Wed Aug 25 01:23:20 2010
New Revision: 988777

URL: http://svn.apache.org/viewvc?rev=988777&view=rev
Log:
Fix test that was failing on Windows

Modified:
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/stat/descriptive/MultivariateSummaryStatisticsTest.java

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/stat/descriptive/MultivariateSummaryStatisticsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/stat/descriptive/MultivariateSummaryStatisticsTest.java?rev=988777&r1=988776&r2=988777&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/stat/descriptive/MultivariateSummaryStatisticsTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/stat/descriptive/MultivariateSummaryStatisticsTest.java
Wed Aug 25 01:23:20 2010
@@ -87,16 +87,17 @@ public class MultivariateSummaryStatisti
         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);
     }



Mime
View raw message