From 8bc95251ae51a1deb982ba8b3dc07c325a30cbf5 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Sun, 8 Jul 2012 14:24:27 +0000 Subject: [PATCH] LUCENE-4199: this is ok, just make it explicit what we are doing and add comment git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene4199@1358747 13f79535-47bb-0310-9956-ffa450edef68 --- .../vectorhighlight/BreakIteratorBoundaryScannerTest.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lucene/highlighter/src/test/org/apache/lucene/search/vectorhighlight/BreakIteratorBoundaryScannerTest.java b/lucene/highlighter/src/test/org/apache/lucene/search/vectorhighlight/BreakIteratorBoundaryScannerTest.java index 4134bb3b8cf..c8a9d5786d1 100644 --- a/lucene/highlighter/src/test/org/apache/lucene/search/vectorhighlight/BreakIteratorBoundaryScannerTest.java +++ b/lucene/highlighter/src/test/org/apache/lucene/search/vectorhighlight/BreakIteratorBoundaryScannerTest.java @@ -57,7 +57,8 @@ public class BreakIteratorBoundaryScannerTest extends LuceneTestCase { public void testSentenceBoundary() throws Exception { StringBuilder text = new StringBuilder(TEXT); - BreakIterator bi = BreakIterator.getSentenceInstance(); + // we test this with default locale, its randomized by LuceneTestCase + BreakIterator bi = BreakIterator.getSentenceInstance(Locale.getDefault()); BoundaryScanner scanner = new BreakIteratorBoundaryScanner(bi); int start = TEXT.indexOf("any application"); @@ -70,7 +71,8 @@ public class BreakIteratorBoundaryScannerTest extends LuceneTestCase { public void testLineBoundary() throws Exception { StringBuilder text = new StringBuilder(TEXT); - BreakIterator bi = BreakIterator.getLineInstance(); + // we test this with default locale, its randomized by LuceneTestCase + BreakIterator bi = BreakIterator.getLineInstance(Locale.getDefault()); BoundaryScanner scanner = new BreakIteratorBoundaryScanner(bi); int start = TEXT.indexOf("any application");