r111341 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r111340‎ | r111341 | r111342 >
Date:00:18, 13 February 2012
Author:oren
Status:deferred
Tags:
Comment:
upgrading test
Modified paths:
  • /trunk/lucene-search-3/src/test/java/org/wikimedia/lsearch/index/WikiIndexModifierTest.java (modified) (history)

Diff [purge]

Index: trunk/lucene-search-3/src/test/java/org/wikimedia/lsearch/index/WikiIndexModifierTest.java
@@ -12,6 +12,7 @@
1313 import org.apache.lucene.analysis.TokenStream;
1414 import org.apache.lucene.document.Document;
1515 import org.apache.lucene.document.Field;
 16+import org.junit.Test;
1617 import org.wikimedia.lsearch.analyzers.Analyzers;
1718 import org.wikimedia.lsearch.analyzers.FieldBuilder;
1819 import org.wikimedia.lsearch.beans.Article;
@@ -27,6 +28,7 @@
2829 Analyzer analyzer = null;
2930 Analyzer highlightAnalyzer = null;
3031
 32+ @Test
3133 public void testMakeDocuments(){
3234 IndexId iid = IndexId.get("enwiki");
3335 String text = "Some very [[simple]] text used for testing\n== Heading 1 ==\nParagraph\n[[Category:Category1]]";
@@ -72,6 +74,7 @@
7375 }
7476 }
7577
 78+ @Test
7679 public void testMakeHighlightDocuments(){
7780 IndexId iid = IndexId.get("enwiki");
7881 String text = "Some very [[simple]] text used for testing\n== Heading 1 ==\nParagraph\n[[Category:Category1]]";
@@ -100,6 +103,7 @@
101104 }
102105 }
103106
 107+ @Test
104108 public void testMakeTitleDocument(){
105109 IndexId iid = IndexId.get("en-titles");
106110 String text = "Some very simple text used for testing\n== Heading 1 ==\nParagraph\n[[Category:Category1]]";
@@ -140,6 +144,7 @@
141145 }
142146 }
143147
 148+ @Test
144149 public void testSpellcheck(){
145150 IndexId iid = IndexId.get("enwiki");
146151 String text = "Some very [[simple]] text used for testing, used for testing of something\n== Heading 1 ==\nParagraph\n[[Category:Category1]]";
@@ -178,6 +183,7 @@
179184 }
180185 }
181186
 187+
182188 public String tokens(String field){
183189 try{
184190 Field f = doc.getField(field);

Sign-offs

UserFlagDate
Nikerabbitinspected07:24, 13 February 2012

Status & tagging log