replaced calls to deprecated DescriptiveStatistics.newInstance() method

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@610792 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Luc Maisonobe 2008-01-10 13:50:46 +00:00
parent 340a732ae2
commit 9ccfeeb4a1
1 changed files with 2 additions and 10 deletions

View File

@ -100,7 +100,7 @@ public final class ListUnivariateImplTest extends TestCase {
} }
public void testSkewAndKurtosis() { public void testSkewAndKurtosis() {
DescriptiveStatistics u = DescriptiveStatistics.newInstance(); DescriptiveStatistics u = new DescriptiveStatistics();
double[] testArray = { 12.5, 12, 11.8, 14.2, 14.9, 14.5, 21, 8.2, 10.3, 11.3, 14.1, double[] testArray = { 12.5, 12, 11.8, 14.2, 14.9, 14.5, 21, 8.2, 10.3, 11.3, 14.1,
9.9, 12.2, 12, 12.1, 11, 19.8, 11, 10, 8.8, 9, 12.3 }; 9.9, 12.2, 12, 12.1, 11, 19.8, 11, 10, 8.8, 9, 12.3 };
@ -140,15 +140,7 @@ public final class ListUnivariateImplTest extends TestCase {
/** test stats */ /** test stats */
public void testSerialization() { public void testSerialization() {
DescriptiveStatistics u = null; DescriptiveStatistics u = new ListUnivariateImpl();
try {
u = DescriptiveStatistics.newInstance(ListUnivariateImpl.class);
} catch (InstantiationException e) {
fail(e.getMessage());
} catch (IllegalAccessException e) {
fail(e.getMessage());
}
assertEquals("total count",0,u.getN(),tolerance); assertEquals("total count",0,u.getN(),tolerance);
u.addValue(one); u.addValue(one);