You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by er...@apache.org on 2016/08/27 16:05:37 UTC
[2/2] commons-rng git commit: Unit tests added but skipped.
Unit tests added but skipped.
Several implementations will knowingly fail them.
Project: http://git-wip-us.apache.org/repos/asf/commons-rng/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-rng/commit/7d729fd7
Tree: http://git-wip-us.apache.org/repos/asf/commons-rng/tree/7d729fd7
Diff: http://git-wip-us.apache.org/repos/asf/commons-rng/diff/7d729fd7
Branch: refs/heads/master
Commit: 7d729fd7823b98b581b36c235faa2c137f06603e
Parents: 90e2a7e
Author: Gilles <er...@apache.org>
Authored: Sat Aug 27 20:01:18 2016 +0200
Committer: Gilles <er...@apache.org>
Committed: Sat Aug 27 20:01:18 2016 +0200
----------------------------------------------------------------------
.../commons/rng/ProvidersCommonParametricTest.java | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/commons-rng/blob/7d729fd7/src/test/java/org/apache/commons/rng/ProvidersCommonParametricTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/rng/ProvidersCommonParametricTest.java b/src/test/java/org/apache/commons/rng/ProvidersCommonParametricTest.java
index a7b3fca..40c3077 100644
--- a/src/test/java/org/apache/commons/rng/ProvidersCommonParametricTest.java
+++ b/src/test/java/org/apache/commons/rng/ProvidersCommonParametricTest.java
@@ -29,6 +29,7 @@ import java.io.ByteArrayInputStream;
import org.junit.Assert;
import org.junit.Test;
import org.junit.Assume;
+import org.junit.Ignore;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameters;
@@ -286,6 +287,22 @@ public class ProvidersCommonParametricTest {
checkNextIntegerInRange(rng, 10, 10000);
}
+ @Ignore@Test
+ public void testZeroIntArraySeed() {
+ // Exercise capacity to escape all "zero" state.
+ final int[] zero = new int[2000]; // Large enough to fill the entire state with zeroes.
+ final UniformRandomProvider rng = RandomSource.create(originalSource, zero, originalArgs);
+ checkNextIntegerInRange(rng, 10, 10000);
+ }
+
+ @Ignore@Test
+ public void testZeroLongArraySeed() {
+ // Exercise capacity to escape all "zero" state.
+ final long[] zero = new long[2000]; // Large enough to fill the entire state with zeroes.
+ final UniformRandomProvider rng = RandomSource.create(originalSource, zero, originalArgs);
+ checkNextIntegerInRange(rng, 10, 10000);
+ }
+
// State save and restore tests.
@Test