From b0d36c82db63f5c6c77d4a7fbf157c5f163bb9e4 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Mon, 26 Mar 2012 01:22:06 +0000 Subject: [PATCH] improve debugging a tad bit git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1305189 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/lucene/analysis/BaseTokenStreamTestCase.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lucene/test-framework/src/java/org/apache/lucene/analysis/BaseTokenStreamTestCase.java b/lucene/test-framework/src/java/org/apache/lucene/analysis/BaseTokenStreamTestCase.java index 3d60a18c43f..76d6e53c5d2 100644 --- a/lucene/test-framework/src/java/org/apache/lucene/analysis/BaseTokenStreamTestCase.java +++ b/lucene/test-framework/src/java/org/apache/lucene/analysis/BaseTokenStreamTestCase.java @@ -158,7 +158,8 @@ public abstract class BaseTokenStreamTestCase extends LuceneTestCase { 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 BaseTokenStreamTestCase extends LuceneTestCase { 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); } }