lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rm...@apache.org
Subject svn commit: r1305189 - /lucene/dev/trunk/lucene/test-framework/src/java/org/apache/lucene/analysis/BaseTokenStreamTestCase.java
Date Mon, 26 Mar 2012 01:22:07 GMT
Author: rmuir
Date: Mon Mar 26 01:22:06 2012
New Revision: 1305189

URL: http://svn.apache.org/viewvc?rev=1305189&view=rev
Log:
improve debugging a tad bit

Modified:
    lucene/dev/trunk/lucene/test-framework/src/java/org/apache/lucene/analysis/BaseTokenStreamTestCase.java

Modified: lucene/dev/trunk/lucene/test-framework/src/java/org/apache/lucene/analysis/BaseTokenStreamTestCase.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/test-framework/src/java/org/apache/lucene/analysis/BaseTokenStreamTestCase.java?rev=1305189&r1=1305188&r2=1305189&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/test-framework/src/java/org/apache/lucene/analysis/BaseTokenStreamTestCase.java
(original)
+++ lucene/dev/trunk/lucene/test-framework/src/java/org/apache/lucene/analysis/BaseTokenStreamTestCase.java
Mon Mar 26 01:22:06 2012
@@ -158,7 +158,8 @@ public abstract class BaseTokenStreamTes
       if (offsetAtt != null) {
         assertTrue("startOffset must be >= 0", offsetAtt.startOffset() >= 0);
         assertTrue("endOffset must be >= 0", offsetAtt.endOffset() >= 0);
-        assertTrue("endOffset must be >= startOffset", offsetAtt.endOffset() >= offsetAtt.startOffset());
+        assertTrue("endOffset must be >= startOffset, got startOffset=" + offsetAtt.startOffset()
+ ",endOffset=" + offsetAtt.endOffset(), 
+            offsetAtt.endOffset() >= offsetAtt.startOffset());
         if (finalOffset != null) {
           assertTrue("startOffset must be <= finalOffset", offsetAtt.startOffset() <=
finalOffset.intValue());
           assertTrue("endOffset must be <= finalOffset: got endOffset=" + offsetAtt.endOffset()
+ " vs finalOffset=" + finalOffset.intValue(),
@@ -393,7 +394,7 @@ public abstract class BaseTokenStreamTes
       try {
         checkAnalysisConsistency(random, a, useCharFilter, text);
       } catch (Throwable t) {
-        System.err.println("TEST FAIL: useCharFilter=" + useCharFilter + " text=" + text);
+        System.err.println("TEST FAIL: useCharFilter=" + useCharFilter + " text='" + text
+ "'");
         throw new RuntimeException(t);
       }
     }



Mime
View raw message