lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rm...@apache.org
Subject svn commit: r923008 - in /lucene/solr/branches/solr/src/test/org/apache/solr/analysis: TestPatternReplaceCharFilter.java TestPatternTokenizerFactory.java TestReversedWildcardFilterFactory.java
Date Sun, 14 Mar 2010 23:47:01 GMT
Author: rmuir
Date: Sun Mar 14 23:47:00 2010
New Revision: 923008

URL: http://svn.apache.org/viewvc?rev=923008&view=rev
Log:
fix bad tests: you cannot test a posInc that does not exist (e.g. some stopfilter etc must
set it first)

Modified:
    lucene/solr/branches/solr/src/test/org/apache/solr/analysis/TestPatternReplaceCharFilter.java
    lucene/solr/branches/solr/src/test/org/apache/solr/analysis/TestPatternTokenizerFactory.java
    lucene/solr/branches/solr/src/test/org/apache/solr/analysis/TestReversedWildcardFilterFactory.java

Modified: lucene/solr/branches/solr/src/test/org/apache/solr/analysis/TestPatternReplaceCharFilter.java
URL: http://svn.apache.org/viewvc/lucene/solr/branches/solr/src/test/org/apache/solr/analysis/TestPatternReplaceCharFilter.java?rev=923008&r1=923007&r2=923008&view=diff
==============================================================================
--- lucene/solr/branches/solr/src/test/org/apache/solr/analysis/TestPatternReplaceCharFilter.java
(original)
+++ lucene/solr/branches/solr/src/test/org/apache/solr/analysis/TestPatternReplaceCharFilter.java
Sun Mar 14 23:47:00 2010
@@ -51,8 +51,7 @@ public class TestPatternReplaceCharFilte
     assertTokenStreamContents(ts,
         new String[] { "this", "is", "test." },
         new int[] { 0, 5, 8 },
-        new int[] { 4, 7, 13 },
-        new int[] { 1, 1, 1 });
+        new int[] { 4, 7, 13 });
   }
   
   // 012345678
@@ -85,8 +84,7 @@ public class TestPatternReplaceCharFilte
     assertTokenStreamContents(ts,
         new String[] { "aa#bb#cc" },
         new int[] { 0 },
-        new int[] { 8 },
-        new int[] { 1 });
+        new int[] { 8 });
   }
 
   //           11111
@@ -101,8 +99,7 @@ public class TestPatternReplaceCharFilte
     assertTokenStreamContents(ts,
         new String[] { "aa##bb###cc", "dd" },
         new int[] { 0, 9 },
-        new int[] { 8, 11 },
-        new int[] { 1, 1 });
+        new int[] { 8, 11 });
   }
 
   // 01234567
@@ -116,8 +113,7 @@ public class TestPatternReplaceCharFilte
     assertTokenStreamContents(ts,
         new String[] { "aa", "aa" },
         new int[] { 1, 4 },
-        new int[] { 2, 5 },
-        new int[] { 1, 1 });
+        new int[] { 2, 5 });
   }
 
   //           11111
@@ -132,8 +128,7 @@ public class TestPatternReplaceCharFilte
     assertTokenStreamContents(ts,
         new String[] { "aa#bb", "dd" },
         new int[] { 0, 12 },
-        new int[] { 11, 14 },
-        new int[] { 1, 1 });
+        new int[] { 11, 14 });
   }
 
   //           111111111122222222223333
@@ -148,8 +143,7 @@ public class TestPatternReplaceCharFilte
     assertTokenStreamContents(ts,
         new String[] { "aa", "bb", "cc", "---", "aa", "bb", "aa", "bb", "cc" },
         new int[] { 2, 6, 9, 11, 15, 18, 21, 25, 29 },
-        new int[] { 4, 8, 10, 14, 17, 20, 23, 27, 33 },
-        new int[] { 1, 1, 1, 1, 1, 1, 1, 1, 1 });
+        new int[] { 4, 8, 10, 14, 17, 20, 23, 27, 33 });
   }
 
   //           11111111112222222222333333333
@@ -164,8 +158,7 @@ public class TestPatternReplaceCharFilte
     assertTokenStreamContents(ts,
         new String[] { "aa##bb", "cc", "---", "aa##bb", "aa.", "bb", "aa##bb", "cc" },
         new int[] { 2, 8, 11, 15, 21, 25, 28, 36 },
-        new int[] { 7, 10, 14, 20, 24, 27, 35, 38 },
-        new int[] { 1, 1, 1, 1, 1, 1, 1, 1 });
+        new int[] { 7, 10, 14, 20, 24, 27, 35, 38 });
   }
 
   //           11111111112222222222333333333
@@ -182,8 +175,7 @@ public class TestPatternReplaceCharFilte
     assertTokenStreamContents(ts,
         new String[] { "aa", "b", "-", "c", ".", "---", "b", "aa", ".", "c", "c", "b" },
         new int[] { 1, 3, 6, 8, 12, 14, 18, 21, 23, 25, 29, 33 },
-        new int[] { 2, 5, 7, 11, 13, 17, 20, 22, 24, 28, 32, 35 },
-        new int[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 });
+        new int[] { 2, 5, 7, 11, 13, 17, 20, 22, 24, 28, 32, 35 });
   }
   
   private Pattern pattern( String p ){

Modified: lucene/solr/branches/solr/src/test/org/apache/solr/analysis/TestPatternTokenizerFactory.java
URL: http://svn.apache.org/viewvc/lucene/solr/branches/solr/src/test/org/apache/solr/analysis/TestPatternTokenizerFactory.java?rev=923008&r1=923007&r2=923008&view=diff
==============================================================================
--- lucene/solr/branches/solr/src/test/org/apache/solr/analysis/TestPatternTokenizerFactory.java
(original)
+++ lucene/solr/branches/solr/src/test/org/apache/solr/analysis/TestPatternTokenizerFactory.java
Sun Mar 14 23:47:00 2010
@@ -97,8 +97,7 @@ public class TestPatternTokenizerFactory
     assertTokenStreamContents(stream,
         new String[] { "Günther", "Günther", "is", "here" },
         new int[] { 0, 13, 26, 29 },
-        new int[] { 12, 25, 28, 33 },
-        new int[] { 1, 1, 1, 1 });
+        new int[] { 12, 25, 28, 33 });
     
     charStream = new MappingCharFilter( normMap, CharReader.get( new StringReader( INPUT
) ) );
     args.put( PatternTokenizerFactory.PATTERN, "Günther" );
@@ -109,8 +108,7 @@ public class TestPatternTokenizerFactory
     assertTokenStreamContents(stream,
         new String[] { "Günther", "Günther" },
         new int[] { 0, 13 },
-        new int[] { 12, 25 },
-        new int[] { 1, 1 });
+        new int[] { 12, 25 });
   }
   
   /** 

Modified: lucene/solr/branches/solr/src/test/org/apache/solr/analysis/TestReversedWildcardFilterFactory.java
URL: http://svn.apache.org/viewvc/lucene/solr/branches/solr/src/test/org/apache/solr/analysis/TestReversedWildcardFilterFactory.java?rev=923008&r1=923007&r2=923008&view=diff
==============================================================================
--- lucene/solr/branches/solr/src/test/org/apache/solr/analysis/TestReversedWildcardFilterFactory.java
(original)
+++ lucene/solr/branches/solr/src/test/org/apache/solr/analysis/TestReversedWildcardFilterFactory.java
Sun Mar 14 23:47:00 2010
@@ -97,8 +97,7 @@ public class TestReversedWildcardFilterF
     assertTokenStreamContents(input,
         new String[] { "one", "two", "three", "si\uD834\uDD1Ex" },
         new int[] { 0, 4, 8, 14 },
-        new int[] { 3, 7, 13, 19 },
-        new int[] { 1, 1, 1, 1 }
+        new int[] { 3, 7, 13, 19 }
     );
   }
   



Mime
View raw message