You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by ps...@apache.org on 2004/06/29 08:08:22 UTC

cvs commit: jakarta-commons/math/src/test/org/apache/commons/math/stat/univariate/moment MeanTest.java

psteitz     2004/06/28 23:08:22

  Modified:    math/src/test/org/apache/commons/math/stat/univariate/moment
                        MeanTest.java
  Log:
  Added tests for n=0, 1.
  
  Revision  Changes    Path
  1.12      +8 -1      jakarta-commons/math/src/test/org/apache/commons/math/stat/univariate/moment/MeanTest.java
  
  Index: MeanTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/test/org/apache/commons/math/stat/univariate/moment/MeanTest.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- MeanTest.java	17 Jun 2004 21:37:05 -0000	1.11
  +++ MeanTest.java	29 Jun 2004 06:08:22 -0000	1.12
  @@ -55,5 +55,12 @@
       public double expectedValue() {
           return this.mean;
       }
  +    
  +    public void testSmallSamples() {
  +        Mean mean = new Mean();
  +        assertTrue(Double.isNaN(mean.getResult()));
  +        mean.increment(1d);
  +        assertEquals(1d, mean.getResult(), 0);
  +    }
   
   }
  
  
  

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