lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From uschind...@apache.org
Subject svn commit: r883080 - /lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/util/TestAttributeSource.java
Date Sun, 22 Nov 2009 14:02:11 GMT
Author: uschindler
Date: Sun Nov 22 14:02:11 2009
New Revision: 883080

URL: http://svn.apache.org/viewvc?rev=883080&view=rev
Log:
LUCENE-2088: Merge test to 3.0, too

Modified:
    lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/util/TestAttributeSource.java
  (contents, props changed)

Modified: lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/util/TestAttributeSource.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/util/TestAttributeSource.java?rev=883080&r1=883079&r2=883080&view=diff
==============================================================================
--- lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/util/TestAttributeSource.java
(original)
+++ lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/util/TestAttributeSource.java
Sun Nov 22 14:02:11 2009
@@ -142,6 +142,7 @@
       src.addAttribute(TypeAttribute.class) instanceof TypeAttributeImpl);
   }
   
+  @SuppressWarnings("unchecked")
   public void testInvalidArguments() throws Exception {
     try {
       AttributeSource src = new AttributeSource();
@@ -154,5 +155,12 @@
       src.addAttribute(Token.class);
       fail("Should throw IllegalArgumentException");
     } catch (IllegalArgumentException iae) {}
+    
+    try {
+      AttributeSource src = new AttributeSource();
+      // break this by unsafe cast
+      src.addAttribute((Class) Iterator.class);
+      fail("Should throw IllegalArgumentException");
+    } catch (IllegalArgumentException iae) {}
   }
 }

Propchange: lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/util/TestAttributeSource.java
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Sun Nov 22 14:02:11 2009
@@ -0,0 +1,4 @@
+/lucene/java/branches/lucene_2_4/src/test/org/apache/lucene/util/TestAttributeSource.java:748824
+/lucene/java/branches/lucene_2_9/src/test/org/apache/lucene/util/TestAttributeSource.java:817269-818600,825998,829134,829881,831036
+/lucene/java/branches/lucene_2_9_back_compat_tests/src/test/org/apache/lucene/util/TestAttributeSource.java:818601-821336
+/lucene/java/trunk/src/test/org/apache/lucene/util/TestAttributeSource.java:881213,881315,881466,881819,882374,882807,882888,882977,883074-883075,883079



Mime
View raw message