mirror of
https://github.com/apache/commons-math.git
synced 2025-02-07 18:49:40 +00:00
Added test case to ensure nextPermutation fails for negative arguments.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@719993 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
0a19478d2d
commit
9b8d0da71a
@ -590,6 +590,15 @@ public class RandomDataTest extends RetryTestCase {
|
||||
} catch (IllegalArgumentException ex) {
|
||||
;
|
||||
}
|
||||
|
||||
// Make sure we fail for k < n < 0
|
||||
try {
|
||||
perm = randomData.nextPermutation(-1,-3);
|
||||
fail("permutation k < n < 0, expecting IllegalArgumentException");
|
||||
} catch (IllegalArgumentException ex) {
|
||||
;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user