lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [38/53] [abbrv] lucenenet git commit: Added EnableHacks flag to BreakIterator tests
Date Wed, 08 Feb 2017 14:32:17 GMT
Added EnableHacks flag to BreakIterator tests


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/253382fd
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/253382fd
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/253382fd

Branch: refs/heads/api-work
Commit: 253382fd594efd191994b3734f457cd20a513586
Parents: 34075f2
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Wed Feb 8 13:13:11 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Wed Feb 8 21:08:24 2017 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Tests.Highlighter/TestBreakIterator.cs            | 2 +-
 .../VectorHighlight/BreakIteratorBoundaryScannerTest.cs          | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/253382fd/src/Lucene.Net.Tests.Highlighter/TestBreakIterator.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Highlighter/TestBreakIterator.cs b/src/Lucene.Net.Tests.Highlighter/TestBreakIterator.cs
index 41a9875..4fa1781 100644
--- a/src/Lucene.Net.Tests.Highlighter/TestBreakIterator.cs
+++ b/src/Lucene.Net.Tests.Highlighter/TestBreakIterator.cs
@@ -37,7 +37,7 @@ namespace Lucene.Net.Search
         private BreakIterator GetWordInstance(CultureInfo locale)
         {
             //return new WordBreakIterator(locale);
-            return new IcuBreakIterator(Icu.BreakIterator.UBreakIteratorType.WORD, locale);
+            return new IcuBreakIterator(Icu.BreakIterator.UBreakIteratorType.WORD, locale)
{ EnableHacks = true };
         }
 
         private BreakIterator GetSentenceInstance(CultureInfo locale)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/253382fd/src/Lucene.Net.Tests.Highlighter/VectorHighlight/BreakIteratorBoundaryScannerTest.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Highlighter/VectorHighlight/BreakIteratorBoundaryScannerTest.cs
b/src/Lucene.Net.Tests.Highlighter/VectorHighlight/BreakIteratorBoundaryScannerTest.cs
index f7d0049..71d3016 100644
--- a/src/Lucene.Net.Tests.Highlighter/VectorHighlight/BreakIteratorBoundaryScannerTest.cs
+++ b/src/Lucene.Net.Tests.Highlighter/VectorHighlight/BreakIteratorBoundaryScannerTest.cs
@@ -54,7 +54,7 @@ namespace Lucene.Net.Search.VectorHighlight
             StringBuilder text = new StringBuilder(TEXT);
             //BreakIterator bi = BreakIterator.getWordInstance(Locale.ROOT);
             //BreakIterator bi = new WordBreakIterator(CultureInfo.CurrentCulture);
-            BreakIterator bi = new IcuBreakIterator(Icu.BreakIterator.UBreakIteratorType.WORD,
CultureInfo.InvariantCulture);
+            BreakIterator bi = new IcuBreakIterator(Icu.BreakIterator.UBreakIteratorType.WORD,
CultureInfo.InvariantCulture) { EnableHacks = true };
             IBoundaryScanner scanner = new BreakIteratorBoundaryScanner(bi);
 
             int start = TEXT.IndexOf("formance");
@@ -71,7 +71,7 @@ namespace Lucene.Net.Search.VectorHighlight
             StringBuilder text = new StringBuilder(TEXT);
             // we test this with default locale, its randomized by LuceneTestCase
             //BreakIterator bi = BreakIterator.getSentenceInstance(Locale.getDefault());
-            BreakIterator bi = new IcuBreakIterator(Icu.BreakIterator.UBreakIteratorType.SENTENCE,
CultureInfo.CurrentCulture);
+            BreakIterator bi = new IcuBreakIterator(Icu.BreakIterator.UBreakIteratorType.SENTENCE,
CultureInfo.CurrentCulture) { EnableHacks = true };
             IBoundaryScanner scanner = new BreakIteratorBoundaryScanner(bi);
 
             int start = TEXT.IndexOf("any application");


Mime
View raw message