lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rm...@apache.org
Subject svn commit: r1212143 - /lucene/dev/branches/branch_3x/lucene/contrib/analyzers/common/src/test/org/apache/lucene/analysis/th/TestThaiAnalyzer.java
Date Thu, 08 Dec 2011 21:50:37 GMT
Author: rmuir
Date: Thu Dec  8 21:50:36 2011
New Revision: 1212143

URL: http://svn.apache.org/viewvc?rev=1212143&view=rev
Log:
consolidate assumes in ThaiAnalyzer test so we don't miss it for individual tests

Modified:
    lucene/dev/branches/branch_3x/lucene/contrib/analyzers/common/src/test/org/apache/lucene/analysis/th/TestThaiAnalyzer.java

Modified: lucene/dev/branches/branch_3x/lucene/contrib/analyzers/common/src/test/org/apache/lucene/analysis/th/TestThaiAnalyzer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/contrib/analyzers/common/src/test/org/apache/lucene/analysis/th/TestThaiAnalyzer.java?rev=1212143&r1=1212142&r2=1212143&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/contrib/analyzers/common/src/test/org/apache/lucene/analysis/th/TestThaiAnalyzer.java
(original)
+++ lucene/dev/branches/branch_3x/lucene/contrib/analyzers/common/src/test/org/apache/lucene/analysis/th/TestThaiAnalyzer.java
Thu Dec  8 21:50:36 2011
@@ -32,11 +32,15 @@ import org.apache.lucene.util.Version;
 
 public class TestThaiAnalyzer extends BaseTokenStreamTestCase {
 	
+  @Override
+  public void setUp() throws Exception {
+    super.setUp();
+    assumeTrue("JRE does not support Thai dictionary-based BreakIterator", ThaiWordFilter.DBBI_AVAILABLE);
+  }
 	/* 
 	 * testcase for offsets
 	 */
 	public void testOffsets() throws Exception {
-	  assumeTrue("JRE does not support Thai dictionary-based BreakIterator", ThaiWordFilter.DBBI_AVAILABLE);
 		assertAnalyzesTo(new ThaiAnalyzer(TEST_VERSION_CURRENT), "การที่ได้ต้องแสดงว่างานดี",

 		    new String[] { "การ", "ที่", "ได้", "ต้อง",
"แสดง", "ว่า", "งาน", "ดี" },
 				new int[] { 0, 3, 6, 9, 13, 17, 20, 23 },
@@ -44,7 +48,6 @@ public class TestThaiAnalyzer extends Ba
 	}
 	
 	public void testTokenType() throws Exception {
-	    assumeTrue("JRE does not support Thai dictionary-based BreakIterator", ThaiWordFilter.DBBI_AVAILABLE);
       assertAnalyzesTo(new ThaiAnalyzer(TEST_VERSION_CURRENT), "การที่ได้ต้องแสดงว่างานดี
๑๒๓", 
                        new String[] { "การ", "ที่", "ได้",
"ต้อง", "แสดง", "ว่า", "งาน",
"ดี", "๑๒๓" },
                        new String[] { "<SOUTHEAST_ASIAN>", "<SOUTHEAST_ASIAN>",

@@ -60,7 +63,6 @@ public class TestThaiAnalyzer extends Ba
  	 */
 	@Deprecated
 	public void testBuggyTokenType30() throws Exception {
-	  assumeTrue("JRE does not support Thai dictionary-based BreakIterator", ThaiWordFilter.DBBI_AVAILABLE);
 		assertAnalyzesTo(new ThaiAnalyzer(Version.LUCENE_30), "การที่ได้ต้องแสดงว่างานดี
๑๒๓", 
                          new String[] { "การ", "ที่", "ได้",
"ต้อง", "แสดง", "ว่า", "งาน",
"ดี", "๑๒๓" },
                          new String[] { "<ALPHANUM>", "<ALPHANUM>", "<ALPHANUM>",

@@ -71,7 +73,6 @@ public class TestThaiAnalyzer extends Ba
 	/** @deprecated testing backwards behavior */
 	@Deprecated
     public void testAnalyzer30() throws Exception {
-	  assumeTrue("JRE does not support Thai dictionary-based BreakIterator", ThaiWordFilter.DBBI_AVAILABLE);
         ThaiAnalyzer analyzer = new ThaiAnalyzer(Version.LUCENE_30);
 	
 		assertAnalyzesTo(analyzer, "", new String[] {});
@@ -97,7 +98,6 @@ public class TestThaiAnalyzer extends Ba
 	 * Test that position increments are adjusted correctly for stopwords.
 	 */
 	public void testPositionIncrements() throws Exception {
-	  assumeTrue("JRE does not support Thai dictionary-based BreakIterator", ThaiWordFilter.DBBI_AVAILABLE);
 	  ThaiAnalyzer analyzer = new ThaiAnalyzer(TEST_VERSION_CURRENT);
 
     assertAnalyzesTo(new ThaiAnalyzer(TEST_VERSION_CURRENT), "การที่ได้ต้อง
the แสดงว่างานดี", 
@@ -115,7 +115,6 @@ public class TestThaiAnalyzer extends Ba
 	}
 	
 	public void testReusableTokenStream() throws Exception {
-	  assumeTrue("JRE does not support Thai dictionary-based BreakIterator", ThaiWordFilter.DBBI_AVAILABLE);
 	  ThaiAnalyzer analyzer = new ThaiAnalyzer(TEST_VERSION_CURRENT);
 	  assertAnalyzesToReuse(analyzer, "", new String[] {});
 
@@ -133,7 +132,6 @@ public class TestThaiAnalyzer extends Ba
 	/** @deprecated, for version back compat */
 	@Deprecated
 	public void testReusableTokenStream30() throws Exception {
-	    assumeTrue("JRE does not support Thai dictionary-based BreakIterator", ThaiWordFilter.DBBI_AVAILABLE);
 	    ThaiAnalyzer analyzer = new ThaiAnalyzer(Version.LUCENE_30);
 	    assertAnalyzesToReuse(analyzer, "", new String[] {});
 
@@ -155,7 +153,6 @@ public class TestThaiAnalyzer extends Ba
   
   // LUCENE-3044
   public void testAttributeReuse() throws Exception {
-    assumeTrue("JRE does not support Thai dictionary-based BreakIterator", ThaiWordFilter.DBBI_AVAILABLE);
     ThaiAnalyzer analyzer = new ThaiAnalyzer(Version.LUCENE_30);
     // just consume
     TokenStream ts = analyzer.reusableTokenStream("dummy", new StringReader("ภาษาไทย"));



Mime
View raw message