db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From krist...@apache.org
Subject svn commit: r760380 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/memorydb/MogTest.java
Date Tue, 31 Mar 2009 09:40:29 GMT
Author: kristwaa
Date: Tue Mar 31 09:40:26 2009
New Revision: 760380

URL: http://svn.apache.org/viewvc?rev=760380&view=rev
Log:
DERBY-4085: Improve testing of the in-memory back end.
Added better error reporting to see if we have to increase the tolerance
or if there is something else wrong with the test.

Patch file: derby-4085-4a-improved_assertion_reporting.diff


Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/memorydb/MogTest.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/memorydb/MogTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/memorydb/MogTest.java?rev=760380&r1=760379&r2=760380&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/memorydb/MogTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/memorydb/MogTest.java
Tue Mar 31 09:40:26 2009
@@ -152,7 +152,10 @@
       final double oth = oths[i];
       final double dif = Math.abs(one - oth);
       final double err = dif / (1.0 + Math.abs(one));
-      assertTrue(err < thresh);
+      // Use if to avoid unnecessary string concatenation.
+      if (err >= thresh) {
+        fail("Error too big;" + err + " >= " + thresh);
+      }
     }
   }
 



Mime
View raw message