commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1066173 - /commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/function/LogisticTest.java
Date Tue, 01 Feb 2011 19:45:20 GMT
Author: sebb
Date: Tue Feb  1 19:45:20 2011
New Revision: 1066173

URL: http://svn.apache.org/viewvc?rev=1066173&view=rev
Log:
Tidy up test

Modified:
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/function/LogisticTest.java

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/function/LogisticTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/function/LogisticTest.java?rev=1066173&r1=1066172&r2=1066173&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/function/LogisticTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/function/LogisticTest.java
Tue Feb  1 19:45:20 2011
@@ -30,19 +30,14 @@ import org.junit.Test;
 public class LogisticTest {
     private final double EPS = Math.ulp(1d);
 
-    @Test
-    public void testPreconditions() {
-        try {
-            final UnivariateRealFunction f = new Logistic(1, 0, 1, 1, 0, -1);
-        } catch (NotStrictlyPositiveException e) {
-            // Expected.
-        }
+    @Test(expected=NotStrictlyPositiveException.class)
+    public void testPreconditions1() {
+        new Logistic(1, 0, 1, 1, 0, -1);
+    }
 
-        try {
-            final UnivariateRealFunction f = new Logistic(1, 0, 1, 1, 0, 0);
-        } catch (NotStrictlyPositiveException e) {
-            // Expected.
-        }
+    @Test(expected=NotStrictlyPositiveException.class)
+    public void testPreconditions2() {
+        new Logistic(1, 0, 1, 1, 0, 0);
     }
 
     @Test



Mime
View raw message