lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From uschind...@apache.org
Subject svn commit: r924850 - in /lucene/java/branches/flex_1458/backwards/src/test/org/apache/lucene: analysis/tokenattributes/TestTermAttributeImpl.java util/TestAttributeSource.java
Date Thu, 18 Mar 2010 15:09:21 GMT
Author: uschindler
Date: Thu Mar 18 15:09:21 2010
New Revision: 924850

URL: http://svn.apache.org/viewvc?rev=924850&view=rev
Log:
fix backwards, too

Modified:
    lucene/java/branches/flex_1458/backwards/src/test/org/apache/lucene/analysis/tokenattributes/TestTermAttributeImpl.java
    lucene/java/branches/flex_1458/backwards/src/test/org/apache/lucene/util/TestAttributeSource.java

Modified: lucene/java/branches/flex_1458/backwards/src/test/org/apache/lucene/analysis/tokenattributes/TestTermAttributeImpl.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/backwards/src/test/org/apache/lucene/analysis/tokenattributes/TestTermAttributeImpl.java?rev=924850&r1=924849&r2=924850&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/backwards/src/test/org/apache/lucene/analysis/tokenattributes/TestTermAttributeImpl.java
(original)
+++ lucene/java/branches/flex_1458/backwards/src/test/org/apache/lucene/analysis/tokenattributes/TestTermAttributeImpl.java
Thu Mar 18 15:09:21 2010
@@ -107,10 +107,10 @@ public class TestTermAttributeImpl exten
     char[] b = {'a', 'l', 'o', 'h', 'a'};
     TermAttributeImpl t = new TermAttributeImpl();
     t.setTermBuffer(b, 0, 5);
-    assertEquals("term=aloha", t.toString());
+    assertEquals("aloha", t.toString());
 
     t.setTermBuffer("hi there");
-    assertEquals("term=hi there", t.toString());
+    assertEquals("hi there", t.toString());
   }
 
   public void testMixedStringArray() throws Exception {

Modified: lucene/java/branches/flex_1458/backwards/src/test/org/apache/lucene/util/TestAttributeSource.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/backwards/src/test/org/apache/lucene/util/TestAttributeSource.java?rev=924850&r1=924849&r2=924850&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/backwards/src/test/org/apache/lucene/util/TestAttributeSource.java
(original)
+++ lucene/java/branches/flex_1458/backwards/src/test/org/apache/lucene/util/TestAttributeSource.java
Thu Mar 18 15:09:21 2010
@@ -78,22 +78,22 @@ public class TestAttributeSource extends
   
   public void testCloneAttributes() {
     final AttributeSource src = new AttributeSource();
-    final TermAttribute termAtt = src.addAttribute(TermAttribute.class);
+    final FlagsAttribute flagsAtt = src.addAttribute(FlagsAttribute.class);
     final TypeAttribute typeAtt = src.addAttribute(TypeAttribute.class);
-    termAtt.setTermBuffer("TestTerm");
+    flagsAtt.setFlags(1234);
     typeAtt.setType("TestType");
     
     final AttributeSource clone = src.cloneAttributes();
     final Iterator<Class<? extends Attribute>> it = clone.getAttributeClassesIterator();
-    assertEquals("TermAttribute must be the first attribute", TermAttribute.class, it.next());
+    assertEquals("FlagsAttribute must be the first attribute", FlagsAttribute.class, it.next());
     assertEquals("TypeAttribute must be the second attribute", TypeAttribute.class, it.next());
     assertFalse("No more attributes", it.hasNext());
     
-    final TermAttribute termAtt2 = clone.getAttribute(TermAttribute.class);
+    final FlagsAttribute flagsAtt2 = clone.getAttribute(FlagsAttribute.class);
     final TypeAttribute typeAtt2 = clone.getAttribute(TypeAttribute.class);
-    assertNotSame("TermAttribute of original and clone must be different instances", termAtt2,
termAtt);
+    assertNotSame("FlagsAttribute of original and clone must be different instances", flagsAtt2,
flagsAtt);
     assertNotSame("TypeAttribute of original and clone must be different instances", typeAtt2,
typeAtt);
-    assertEquals("TermAttribute of original and clone must be equal", termAtt2, termAtt);
+    assertEquals("FlagsAttribute of original and clone must be equal", flagsAtt2, flagsAtt);
     assertEquals("TypeAttribute of original and clone must be equal", typeAtt2, typeAtt);
   }
   



Mime
View raw message