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/31 13:50:27 UTC
[2/2] commons-rng git commit: Fixed unit test.
Fixed unit test.
Typo and wrong exception.
Project: http://git-wip-us.apache.org/repos/asf/commons-rng/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-rng/commit/d0989acd
Tree: http://git-wip-us.apache.org/repos/asf/commons-rng/tree/d0989acd
Diff: http://git-wip-us.apache.org/repos/asf/commons-rng/diff/d0989acd
Branch: refs/heads/master
Commit: d0989acd516d3493540541104905e07e994a8500
Parents: 0384969
Author: Gilles <er...@apache.org>
Authored: Wed Aug 31 17:48:21 2016 +0200
Committer: Gilles <er...@apache.org>
Committed: Wed Aug 31 17:48:21 2016 +0200
----------------------------------------------------------------------
.../apache/commons/rng/internal/source64/TwoCmresTest.java | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/commons-rng/blob/d0989acd/src/test/java/org/apache/commons/rng/internal/source64/TwoCmresTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/rng/internal/source64/TwoCmresTest.java b/src/test/java/org/apache/commons/rng/internal/source64/TwoCmresTest.java
index fc21d20..664932a 100644
--- a/src/test/java/org/apache/commons/rng/internal/source64/TwoCmresTest.java
+++ b/src/test/java/org/apache/commons/rng/internal/source64/TwoCmresTest.java
@@ -58,7 +58,7 @@ public class TwoCmresTest {
final int max = TwoCmres.numberOfSubcycleGenerators();
for (int i = 0; i < max; i++) {
- for (int j = 0; j < max; i++) {
+ for (int j = 0; j < max; j++) {
if (i != j) { // Subcycle generators must be different.
// Can be instantiated.
new TwoCmres(seed, i, j);
@@ -70,17 +70,16 @@ public class TwoCmresTest {
try {
new TwoCmres(seed, wrongIndex, 1);
Assert.fail("Exception expected for index=" + wrongIndex);
- } catch (IllegalArgumentException e) {
+ } catch (IndexOutOfBoundsException e) {
// Expected.
}
try {
new TwoCmres(seed, 1, wrongIndex);
Assert.fail("Exception expected for index=" + wrongIndex);
- } catch (IllegalArgumentException e) {
+ } catch (IndexOutOfBoundsException e) {
// Expected.
}
}
}
}
-