directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r760939 - /directory/apacheds/branches/ldif-partition/core-avl/src/test/java/org/apache/directory/server/core/avltree/AvlTreeMapTest.java
Date Wed, 01 Apr 2009 15:56:49 GMT
Author: akarasulu
Date: Wed Apr  1 15:56:48 2009
New Revision: 760939

URL: http://svn.apache.org/viewvc?rev=760939&view=rev
Log:
added test case for AvlTreeMap demonstrating issue with insert on replace.

Modified:
    directory/apacheds/branches/ldif-partition/core-avl/src/test/java/org/apache/directory/server/core/avltree/AvlTreeMapTest.java

Modified: directory/apacheds/branches/ldif-partition/core-avl/src/test/java/org/apache/directory/server/core/avltree/AvlTreeMapTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/ldif-partition/core-avl/src/test/java/org/apache/directory/server/core/avltree/AvlTreeMapTest.java?rev=760939&r1=760938&r2=760939&view=diff
==============================================================================
--- directory/apacheds/branches/ldif-partition/core-avl/src/test/java/org/apache/directory/server/core/avltree/AvlTreeMapTest.java
(original)
+++ directory/apacheds/branches/ldif-partition/core-avl/src/test/java/org/apache/directory/server/core/avltree/AvlTreeMapTest.java
Wed Apr  1 15:56:48 2009
@@ -31,6 +31,7 @@
 import java.util.List;
 
 import org.junit.Before;
+import org.junit.Ignore;
 import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -114,6 +115,18 @@
 
 
     @Test
+    @Ignore ( "insert() contract is not observed on replacement" )
+    public void testInsertWithReplace()
+    {
+        assertNull( tree.insert( 43, 891 ) );
+        assertEquals( 891, tree.find( 43 ).getValue().intValue() );
+        
+        assertNotNull( tree.insert( 43, 16 ) );
+        assertEquals( 16, tree.find( 43 ).getValue().intValue() );
+    }
+    
+
+    @Test
     public void testInsert()
     {
         assertNull( tree.insert( 3, 1 ) );
@@ -155,6 +168,7 @@
     }
 
 
+    @SuppressWarnings("unchecked")
     @Test
     public void testDuplicateKeyInsert()
     {



Mime
View raw message