You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by sy...@apache.org on 2016/09/01 14:36:31 UTC

[11/22] lucenenet git commit: Updated TestSynonymMap formatting to make them easier to read.

Updated TestSynonymMap formatting to make them easier to read.


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

Branch: refs/heads/analysis-work
Commit: 196ce641f26f0de13978f905ce890623f380c552
Parents: 63e3e22
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Thu Aug 25 22:04:57 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Thu Aug 25 22:04:57 2016 +0700

----------------------------------------------------------------------
 .../Analysis/Synonym/TestSynonymMapFilter.cs    | 20 +++++++++++++++++---
 1 file changed, 17 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/196ce641/src/Lucene.Net.Tests.Analysis.Common/Analysis/Synonym/TestSynonymMapFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Synonym/TestSynonymMapFilter.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Synonym/TestSynonymMapFilter.cs
index a4a3f35..d53bb3b 100644
--- a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Synonym/TestSynonymMapFilter.cs
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Synonym/TestSynonymMapFilter.cs
@@ -112,7 +112,7 @@ namespace Lucene.Net.Analysis.Synonym
                     int expectedPosLen;
                     if (colonIndex != -1)
                     {
-                        expectedToken = expectedAtPos[atPos].Substring(0, colonIndex);
+                        expectedToken = expectedAtPos[atPos].Substring(0, colonIndex - 0);
                         if (underbarIndex != -1)
                         {
                             expectedEndOffset = int.Parse(expectedAtPos[atPos].Substring(1 + colonIndex, underbarIndex - (1 + colonIndex)));
@@ -157,7 +157,14 @@ namespace Lucene.Net.Analysis.Synonym
             SynonymMap map = b.Build();
             Analyzer analyzer = new AnalyzerAnonymousInnerClassHelper(this, map);
 
-            AssertAnalyzesTo(analyzer, "a b c", new string[] { "foo", "c" }, new int[] { 0, 4 }, new int[] { 3, 5 }, null, new int[] { 1, 1 }, new int[] { 1, 1 }, true);
+            AssertAnalyzesTo(analyzer, "a b c", 
+                            new string[] { "foo", "c" }, 
+                            new int[] { 0, 4 }, 
+                            new int[] { 3, 5 }, 
+                            null, 
+                            new int[] { 1, 1 }, 
+                            new int[] { 1, 1 }, 
+                            true);
             CheckAnalysisConsistency(Random(), analyzer, false, "a b c");
         }
 
@@ -190,7 +197,14 @@ namespace Lucene.Net.Analysis.Synonym
 
             Analyzer analyzer = new AnalyzerAnonymousInnerClassHelper2(this, map);
 
-            AssertAnalyzesTo(analyzer, "a b c", new string[] { "a", "foo", "b", "c" }, new int[] { 0, 0, 2, 4 }, new int[] { 1, 3, 3, 5 }, null, new int[] { 1, 0, 1, 1 }, new int[] { 1, 2, 1, 1 }, true);
+            AssertAnalyzesTo(analyzer, "a b c", 
+                            new string[] { "a", "foo", "b", "c" }, 
+                            new int[] { 0, 0, 2, 4 }, 
+                            new int[] { 1, 3, 3, 5 }, 
+                            null, 
+                            new int[] { 1, 0, 1, 1 }, 
+                            new int[] { 1, 2, 1, 1 }, 
+                            true);
             CheckAnalysisConsistency(Random(), analyzer, false, "a b c");
         }