commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pste...@apache.org
Subject cvs commit: jakarta-commons/math/src/test/org/apache/commons/math/stat/univariate StorelessUnivariateStatisticAbstractTest.java
Date Wed, 07 Jul 2004 12:50:50 GMT
psteitz     2004/07/07 05:50:50

  Modified:    math/src/test/org/apache/commons/math/stat/univariate
                        StorelessUnivariateStatisticAbstractTest.java
  Log:
  Add evaluate/increment consistency test.
  
  Revision  Changes    Path
  1.15      +11 -1     jakarta-commons/math/src/test/org/apache/commons/math/stat/univariate/StorelessUnivariateStatisticAbstractTest.java
  
  Index: StorelessUnivariateStatisticAbstractTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/test/org/apache/commons/math/stat/univariate/StorelessUnivariateStatisticAbstractTest.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- StorelessUnivariateStatisticAbstractTest.java	29 Jun 2004 06:11:22 -0000	1.14
  +++ StorelessUnivariateStatisticAbstractTest.java	7 Jul 2004 12:50:50 -0000	1.15
  @@ -136,5 +136,15 @@
               assertEquals(0d, moment.getResult(), 0);
           }
       }
  +    
  +    /** 
  +     * Make sure that evaluate(double[]) and inrementAll(double[]), 
  +     * getResult() give same results.
  +     */
  +    public void testConsistency() {
  +        StorelessUnivariateStatistic stat = (StorelessUnivariateStatistic) getUnivariateStatistic();
  +        stat.incrementAll(testArray);
  +        assertEquals(stat.getResult(), stat.evaluate(testArray), getTolerance());
  +    }
   
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message