[prev in list] [next in list] [prev in thread] [next in thread]
List: jakarta-commons-dev
Subject: [2/2] commons-rng git commit: Fixed unit test.
From: erans () apache ! org
Date: 2016-08-31 13:50:27
Message-ID: 1be28f6f8a754bf2be39a54b20edbc79 () git ! apache ! org
[Download RAW message or body]
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 <erans@apache.org>
Authored: Wed Aug 31 17:48:21 2016 +0200
Committer: Gilles <erans@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.
}
}
}
}
-
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic