commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pste...@apache.org
Subject svn commit: r556485 - /jakarta/commons/proper/math/trunk/src/test/org/apache/commons/math/random/RandomDataTest.java
Date Mon, 16 Jul 2007 01:21:45 GMT
Author: psteitz
Date: Sun Jul 15 18:21:45 2007
New Revision: 556485

URL: http://svn.apache.org/viewvc?view=rev&rev=556485
Log:
Added test to confirm that nextUniform excludes endpoints.

Modified:
    jakarta/commons/proper/math/trunk/src/test/org/apache/commons/math/random/RandomDataTest.java

Modified: jakarta/commons/proper/math/trunk/src/test/org/apache/commons/math/random/RandomDataTest.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/math/trunk/src/test/org/apache/commons/math/random/RandomDataTest.java?view=diff&rev=556485&r1=556484&r2=556485
==============================================================================
--- jakarta/commons/proper/math/trunk/src/test/org/apache/commons/math/random/RandomDataTest.java
(original)
+++ jakarta/commons/proper/math/trunk/src/test/org/apache/commons/math/random/RandomDataTest.java
Sun Jul 15 18:21:45 2007
@@ -367,6 +367,14 @@
             testStatistic.chiSquare(expected,observed) < 10.83);  
     }
     
+    /** test exclusive endpoints of nextUniform **/
+    public void testNextUniformExclusiveEndpoints() {
+        for (int i = 0; i < 1000; i++) {
+            double u = randomData.nextUniform(0.99, 1);
+            assertTrue(u > 0.99 && u < 1);
+        }
+    }
+    
     /** test failure modes and distribution of nextGaussian() */  
     public void testNextGaussian() { 
         try {



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