lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From uschind...@apache.org
Subject svn commit: r826401 - /lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/analysis/TestToken.java
Date Sun, 18 Oct 2009 10:36:00 GMT
Author: uschindler
Date: Sun Oct 18 10:36:00 2009
New Revision: 826401

URL: http://svn.apache.org/viewvc?rev=826401&view=rev
Log:
LUCENE-1987: Fix bw tests

Modified:
    lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/analysis/TestToken.java

Modified: lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/analysis/TestToken.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/analysis/TestToken.java?rev=826401&r1=826400&r2=826401&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/analysis/TestToken.java
(original)
+++ lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/analysis/TestToken.java
Sun Oct 18 10:36:00 2009
@@ -146,7 +146,7 @@
     t.setTermBuffer(b, 0, 5);
     assertEquals("(aloha,0,5)", t.toString());
 
-    t.setTermText("hi there");
+    t.setTermBuffer("hi there");
     assertEquals("(hi there,0,5)", t.toString());
   }
 
@@ -167,20 +167,17 @@
   
   public void testMixedStringArray() throws Exception {
     Token t = new Token("hello", 0, 5);
-    assertEquals(t.termText(), "hello");
     assertEquals(t.termLength(), 5);
     assertEquals(t.term(), "hello");
-    t.setTermText("hello2");
+    t.setTermBuffer("hello2");
     assertEquals(t.termLength(), 6);
     assertEquals(t.term(), "hello2");
     t.setTermBuffer("hello3".toCharArray(), 0, 6);
-    assertEquals(t.termText(), "hello3");
+    assertEquals(t.term(), "hello3");
 
-    // Make sure if we get the buffer and change a character
-    // that termText() reflects the change
     char[] buffer = t.termBuffer();
     buffer[1] = 'o';
-    assertEquals(t.termText(), "hollo3");
+    assertEquals(t.term(), "hollo3");
   }
   
   public void testClone() throws Exception {



Mime
View raw message