Added test to confirm that nextUniform excludes endpoints.

git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@556485 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Phil Steitz 2007-07-16 01:21:45 +00:00
parent 5976a62dee
commit 13eb8cca17
1 changed files with 8 additions and 0 deletions

View File

@ -367,6 +367,14 @@ public class RandomDataTest extends RetryTestCase {
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 {