Need to call fail() if we don't generate an Exception

Remove unread variable

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1003534 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sebastian Bazley 2010-10-01 13:42:15 +00:00
parent 9dd76438e2
commit 4ed729fc59
2 changed files with 4 additions and 2 deletions

View File

@ -116,7 +116,8 @@ public class ExponentialDistributionTest extends ContinuousDistributionAbstractT
public void testPreconditions() {
try {
ExponentialDistribution distribution = new ExponentialDistributionImpl(0);
new ExponentialDistributionImpl(0);
fail("Should have generated NotStrictlyPositiveException");
} catch (NotStrictlyPositiveException e) {
// Expected.
}

View File

@ -128,7 +128,8 @@ public class NormalDistributionTest extends ContinuousDistributionAbstractTest
public void testPreconditions() {
try {
NormalDistribution distribution = new NormalDistributionImpl(1, 0);
new NormalDistributionImpl(1, 0);
fail("Should have generated NotStrictlyPositiveException");
} catch (NotStrictlyPositiveException e) {
// Expected.
}