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 AbstractUnivariateStatisticTest.java
Date Mon, 12 Apr 2004 12:00:42 GMT
psteitz     2004/04/12 05:00:41

  Modified:    math/src/test/org/apache/commons/math/stat/univariate
                        AbstractUnivariateStatisticTest.java
  Log:
  Added missing fail stmnts, fixed index error
  
  Revision  Changes    Path
  1.3       +7 -2      jakarta-commons/math/src/test/org/apache/commons/math/stat/univariate/AbstractUnivariateStatisticTest.java
  
  Index: AbstractUnivariateStatisticTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/test/org/apache/commons/math/stat/univariate/AbstractUnivariateStatisticTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AbstractUnivariateStatisticTest.java	12 Apr 2004 05:26:10 -0000	1.2
  +++ AbstractUnivariateStatisticTest.java	12 Apr 2004 12:00:41 -0000	1.3
  @@ -46,7 +46,7 @@
       protected Mean testStatistic = new Mean();
       
       public void testTestPositive() {
  -        for (int j = 0; j < 5; j++) {
  +        for (int j = 0; j < 6; j++) {
               for (int i = 1; i < (7 - j); i++) {
                   assertTrue(testStatistic.test(testArray, 0, i));
               }  
  @@ -59,26 +59,31 @@
           assertFalse(testStatistic.test(testArray, 0, 0));
           try {
               testStatistic.test(singletonArray, 2, 1);  // start past end
  +            fail("Expecting IllegalArgumentException");
           } catch (IllegalArgumentException ex) {
               // expected
           }
           try {
               testStatistic.test(testArray, 0, 7);  // end past end
  +            fail("Expecting IllegalArgumentException");
           } catch (IllegalArgumentException ex) {
               // expected
           }
           try {
               testStatistic.test(testArray, -1, 1);  // start negative
  +            fail("Expecting IllegalArgumentException");
           } catch (IllegalArgumentException ex) {
               // expected
           }
           try {
               testStatistic.test(testArray, 0, -1);  // length negative
  +            fail("Expecting IllegalArgumentException");
           } catch (IllegalArgumentException ex) {
               // expected
           }
           try {
               testStatistic.test(nullArray, 0, 1);  // null array
  +            fail("Expecting IllegalArgumentException");
           } catch (IllegalArgumentException ex) {
               // expected
           }      
  
  
  

---------------------------------------------------------------------
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