directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1512386 - in /directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree: ./ serializer/
Date Fri, 09 Aug 2013 16:36:45 GMT
Author: elecharny
Date: Fri Aug  9 16:36:45 2013
New Revision: 1512386

URL: http://svn.apache.org/r1512386
Log:
Fixed many warnings

Modified:
    directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/BTreeBuilderTest.java
    directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/InMemoryBTreeTest.java
    directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/MultiThreadedBtreeTest.java
    directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/ReadTest.java
    directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/RecordManagerTest.java
    directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/RecordManagerWithDuplicatesTest.java
    directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/serializer/ByteSerializerTest.java
    directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/serializer/CharSerializerTest.java
    directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/serializer/IntSerializerTest.java
    directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/serializer/LongSerializerTest.java
    directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/serializer/ShortSerializerTest.java

Modified: directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/BTreeBuilderTest.java
URL: http://svn.apache.org/viewvc/directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/BTreeBuilderTest.java?rev=1512386&r1=1512385&r2=1512386&view=diff
==============================================================================
--- directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/BTreeBuilderTest.java
(original)
+++ directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/BTreeBuilderTest.java
Fri Aug  9 16:36:45 2013
@@ -52,13 +52,13 @@ public class BTreeBuilderTest
         BTreeBuilder<Integer, Integer> bb = new BTreeBuilder<Integer, Integer>(
"master", 4, ser, ser );
 
         // contains 1, 2, 3, 4, 5, 6, 7
-        BTree btree = bb.build( sortedTuple.iterator() );
+        BTree<Integer, Integer> btree = bb.build( sortedTuple.iterator() );
 
         assertEquals( 1, btree.rootPage.getNbElems() );
 
-        assertEquals( 7, btree.rootPage.findRightMost().getKey() );
+        assertEquals( 7, btree.rootPage.findRightMost().getKey().intValue() );
 
-        assertEquals( 1, btree.rootPage.findLeftMost().getKey() );
+        assertEquals( 1, btree.rootPage.findLeftMost().getKey().intValue() );
 
         Cursor<Integer, Integer> cursor = btree.browse();
         int i = 0;

Modified: directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/InMemoryBTreeTest.java
URL: http://svn.apache.org/viewvc/directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/InMemoryBTreeTest.java?rev=1512386&r1=1512385&r2=1512386&view=diff
==============================================================================
--- directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/InMemoryBTreeTest.java
(original)
+++ directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/InMemoryBTreeTest.java
Fri Aug  9 16:36:45 2013
@@ -401,8 +401,6 @@ public class InMemoryBTreeTest
             }
         }
 
-        int i = 0;
-
         long[] deletes = new long[]
             {
                 1,
@@ -415,8 +413,6 @@ public class InMemoryBTreeTest
 
         for ( long value : deletes )
         {
-            //System.out.println( "Deleting #" + i + " : " + value );
-            i++;
             Tuple<Long, String> tuple = btree.delete( value );
 
             if ( tuple != null )

Modified: directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/MultiThreadedBtreeTest.java
URL: http://svn.apache.org/viewvc/directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/MultiThreadedBtreeTest.java?rev=1512386&r1=1512385&r2=1512386&view=diff
==============================================================================
--- directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/MultiThreadedBtreeTest.java
(original)
+++ directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/MultiThreadedBtreeTest.java
Fri Aug  9 16:36:45 2013
@@ -128,13 +128,8 @@ public class MultiThreadedBtreeTest
             }
         }
 
-        long revision = cursor.getRevision();
-
         cursor.close();
 
-        //System.out.println( Thread.currentThread().getName() + " Nb elements read : " +
nb + " on revision : "
-        //    + revision );
-
         return nb;
     }
 

Modified: directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/ReadTest.java
URL: http://svn.apache.org/viewvc/directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/ReadTest.java?rev=1512386&r1=1512385&r2=1512386&view=diff
==============================================================================
--- directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/ReadTest.java
(original)
+++ directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/ReadTest.java
Fri Aug  9 16:36:45 2013
@@ -256,7 +256,7 @@ public class ReadTest
             { 0x01, 0x23, 0x45, 0x67 };
 
         // Set the bytes at the beginning
-        long position = ( Long ) storeMethod.invoke( recordManager, 0L, bytes, pageIos );
+        storeMethod.invoke( recordManager, 0L, bytes, pageIos );
 
         // Read the bytes back
         byte[] readBytes = ( byte[] ) readBytesMethod.invoke( recordManager, pageIos, 0L
);
@@ -272,7 +272,7 @@ public class ReadTest
         assertEquals( 0x67, readBytes[pos++] );
 
         // Set the bytes at the end of the first page
-        position = ( Long ) storeMethod.invoke( recordManager, 12L, bytes, pageIos );
+        storeMethod.invoke( recordManager, 12L, bytes, pageIos );
 
         // Read the bytes back
         readBytes = ( byte[] ) readBytesMethod.invoke( recordManager, pageIos, 12L );
@@ -295,7 +295,7 @@ public class ReadTest
             bytes[i] = ( byte ) ( i + 1 );
         }
 
-        position = ( Long ) storeMethod.invoke( recordManager, 0L, bytes, pageIos );
+        storeMethod.invoke( recordManager, 0L, bytes, pageIos );
 
         // Read the bytes back
         readBytes = ( byte[] ) readBytesMethod.invoke( recordManager, pageIos, 0L );
@@ -304,6 +304,7 @@ public class ReadTest
         pos = 0;
         assertNotNull( readBytes );
         assertEquals( 16, readBytes.length );
+
         // The data
         for ( int i = 0; i < 16; i++ )
         {
@@ -311,7 +312,7 @@ public class ReadTest
         }
 
         // Write the bytes over 2 pages
-        position = ( Long ) storeMethod.invoke( recordManager, 15L, bytes, pageIos );
+        storeMethod.invoke( recordManager, 15L, bytes, pageIos );
 
         // Read the bytes back
         readBytes = ( byte[] ) readBytesMethod.invoke( recordManager, pageIos, 15L );
@@ -334,7 +335,7 @@ public class ReadTest
             bytes[i] = ( byte ) ( i + 1 );
         }
 
-        position = ( Long ) storeMethod.invoke( recordManager, 2L, bytes, pageIos );
+        storeMethod.invoke( recordManager, 2L, bytes, pageIos );
 
         // Read the bytes back
         readBytes = ( byte[] ) readBytesMethod.invoke( recordManager, pageIos, 2L );

Modified: directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/RecordManagerTest.java
URL: http://svn.apache.org/viewvc/directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/RecordManagerTest.java?rev=1512386&r1=1512385&r2=1512386&view=diff
==============================================================================
--- directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/RecordManagerTest.java
(original)
+++ directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/RecordManagerTest.java
Fri Aug  9 16:36:45 2013
@@ -118,7 +118,7 @@ public class RecordManagerTest
         assertEquals( 1, managedBTrees.size() );
         assertTrue( managedBTrees.contains( "test" ) );
 
-        BTree btree1 = recordManager1.getManagedTree( "test" );
+        BTree<Long, String> btree1 = recordManager1.getManagedTree( "test" );
 
         assertNotNull( btree1 );
         assertEquals( btree.getComparator().getClass().getName(), btree1.getComparator().getClass().getName()
);
@@ -314,7 +314,8 @@ public class RecordManagerTest
     }
 
 
-    private void checkBTreeRevisionBrowse( BTree btree, long revision, long... values ) throws
IOException,
+    private void checkBTreeRevisionBrowse( BTree<Long, String> btree, long revision,
long... values )
+        throws IOException,
         KeyNotFoundException
     {
         Cursor<Long, String> cursor = btree.browse( revision );
@@ -345,7 +346,7 @@ public class RecordManagerTest
     }
 
 
-    private void checkBTreeRevisionBrowseFrom( BTree btree, long revision, long from, long...
values )
+    private void checkBTreeRevisionBrowseFrom( BTree<Long, String> btree, long revision,
long from, long... values )
         throws IOException,
         KeyNotFoundException
     {
@@ -833,7 +834,8 @@ public class RecordManagerTest
         int numKeys = 2;
         String name = "duplicateTree";
 
-        BTree<Long, String> dupsTree = new BTree( name, null, new LongSerializer(),
new StringSerializer(), pageSize,
+        BTree<Long, String> dupsTree = new BTree<Long, String>( name, null, new
LongSerializer(),
+            new StringSerializer(), pageSize,
             true );
 
         recordManager1.manage( dupsTree );

Modified: directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/RecordManagerWithDuplicatesTest.java
URL: http://svn.apache.org/viewvc/directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/RecordManagerWithDuplicatesTest.java?rev=1512386&r1=1512385&r2=1512386&view=diff
==============================================================================
--- directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/RecordManagerWithDuplicatesTest.java
(original)
+++ directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/RecordManagerWithDuplicatesTest.java
Fri Aug  9 16:36:45 2013
@@ -110,7 +110,7 @@ public class RecordManagerWithDuplicates
         assertEquals( 1, managedBTrees.size() );
         assertTrue( managedBTrees.contains( "test" ) );
 
-        BTree btree1 = recordManager.getManagedTree( "test" );
+        BTree<Long, String> btree1 = recordManager.getManagedTree( "test" );
 
         assertNotNull( btree1 );
         assertEquals( btree.getComparator().getClass().getName(), btree1.getComparator().getClass().getName()
);

Modified: directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/serializer/ByteSerializerTest.java
URL: http://svn.apache.org/viewvc/directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/serializer/ByteSerializerTest.java?rev=1512386&r1=1512385&r2=1512386&view=diff
==============================================================================
--- directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/serializer/ByteSerializerTest.java
(original)
+++ directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/serializer/ByteSerializerTest.java
Fri Aug  9 16:36:45 2013
@@ -41,7 +41,7 @@ public class ByteSerializerTest
     public void testByteSerializer() throws IOException
     {
         byte value = 0x00;
-        byte[] result = serializer.serialize( value );
+        byte[] result = ByteSerializer.serialize( value );
 
         assertEquals( ( byte ) 0x00, result[0] );
 
@@ -49,7 +49,7 @@ public class ByteSerializerTest
 
         // ------------------------------------------------------------------
         value = 0x01;
-        result = serializer.serialize( value );
+        result = ByteSerializer.serialize( value );
 
         assertEquals( ( byte ) 0x01, result[0] );
 
@@ -57,7 +57,7 @@ public class ByteSerializerTest
 
         // ------------------------------------------------------------------
         value = 0x7F;
-        result = serializer.serialize( value );
+        result = ByteSerializer.serialize( value );
 
         assertEquals( ( byte ) 0x7F, result[0] );
 
@@ -65,7 +65,7 @@ public class ByteSerializerTest
 
         // ------------------------------------------------------------------
         value = ( byte ) 0x80;
-        result = serializer.serialize( value );
+        result = ByteSerializer.serialize( value );
 
         assertEquals( ( byte ) 0x80, result[0] );
 
@@ -73,7 +73,7 @@ public class ByteSerializerTest
 
         // ------------------------------------------------------------------
         value = ( byte ) 0xFF;
-        result = serializer.serialize( value );
+        result = ByteSerializer.serialize( value );
 
         assertEquals( ( byte ) 0xFF, result[0] );
 

Modified: directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/serializer/CharSerializerTest.java
URL: http://svn.apache.org/viewvc/directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/serializer/CharSerializerTest.java?rev=1512386&r1=1512385&r2=1512386&view=diff
==============================================================================
--- directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/serializer/CharSerializerTest.java
(original)
+++ directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/serializer/CharSerializerTest.java
Fri Aug  9 16:36:45 2013
@@ -41,7 +41,7 @@ public class CharSerializerTest
     public void testCharSerializer() throws IOException
     {
         char value = 0x0000;
-        byte[] result = serializer.serialize( value );
+        byte[] result = CharSerializer.serialize( value );
 
         assertEquals( ( byte ) 0x00, result[1] );
         assertEquals( ( byte ) 0x00, result[0] );
@@ -50,7 +50,7 @@ public class CharSerializerTest
 
         // ------------------------------------------------------------------
         value = 0x0001;
-        result = serializer.serialize( value );
+        result = CharSerializer.serialize( value );
 
         assertEquals( ( byte ) 0x01, result[1] );
         assertEquals( ( byte ) 0x00, result[0] );
@@ -59,7 +59,7 @@ public class CharSerializerTest
 
         // ------------------------------------------------------------------
         value = 0x00FF;
-        result = serializer.serialize( value );
+        result = CharSerializer.serialize( value );
 
         assertEquals( ( byte ) 0xFF, result[1] );
         assertEquals( ( byte ) 0x00, result[0] );
@@ -68,7 +68,7 @@ public class CharSerializerTest
 
         // ------------------------------------------------------------------
         value = 0x0100;
-        result = serializer.serialize( value );
+        result = CharSerializer.serialize( value );
 
         assertEquals( ( byte ) 0x00, result[1] );
         assertEquals( ( byte ) 0x01, result[0] );
@@ -77,7 +77,7 @@ public class CharSerializerTest
 
         // ------------------------------------------------------------------
         value = 0x7FFF;
-        result = serializer.serialize( value );
+        result = CharSerializer.serialize( value );
 
         assertEquals( ( byte ) 0xFF, result[1] );
         assertEquals( ( byte ) 0x7F, result[0] );
@@ -86,7 +86,7 @@ public class CharSerializerTest
 
         // ------------------------------------------------------------------
         value = 0x8000;
-        result = serializer.serialize( value );
+        result = CharSerializer.serialize( value );
 
         assertEquals( ( byte ) 0x00, result[1] );
         assertEquals( ( byte ) 0x80, result[0] );
@@ -95,7 +95,7 @@ public class CharSerializerTest
 
         // ------------------------------------------------------------------
         value = 0xFFFF;
-        result = serializer.serialize( value );
+        result = CharSerializer.serialize( value );
 
         assertEquals( ( byte ) 0xFF, result[1] );
         assertEquals( ( byte ) 0xFF, result[0] );

Modified: directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/serializer/IntSerializerTest.java
URL: http://svn.apache.org/viewvc/directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/serializer/IntSerializerTest.java?rev=1512386&r1=1512385&r2=1512386&view=diff
==============================================================================
--- directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/serializer/IntSerializerTest.java
(original)
+++ directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/serializer/IntSerializerTest.java
Fri Aug  9 16:36:45 2013
@@ -41,7 +41,7 @@ public class IntSerializerTest
     public void testIntSerializer() throws IOException
     {
         int value = 0x00000000;
-        byte[] result = serializer.serialize( value );
+        byte[] result = IntSerializer.serialize( value );
 
         assertEquals( ( byte ) 0x00, result[3] );
         assertEquals( ( byte ) 0x00, result[2] );
@@ -52,7 +52,7 @@ public class IntSerializerTest
 
         // ------------------------------------------------------------------
         value = 0x00000001;
-        result = serializer.serialize( value );
+        result = IntSerializer.serialize( value );
 
         assertEquals( ( byte ) 0x01, result[3] );
         assertEquals( ( byte ) 0x00, result[2] );
@@ -63,7 +63,7 @@ public class IntSerializerTest
 
         // ------------------------------------------------------------------
         value = 0x000000FF;
-        result = serializer.serialize( value );
+        result = IntSerializer.serialize( value );
 
         assertEquals( ( byte ) 0xFF, result[3] );
         assertEquals( ( byte ) 0x00, result[2] );
@@ -74,7 +74,7 @@ public class IntSerializerTest
 
         // ------------------------------------------------------------------
         value = 0x00000100;
-        result = serializer.serialize( value );
+        result = IntSerializer.serialize( value );
 
         assertEquals( ( byte ) 0x00, result[3] );
         assertEquals( ( byte ) 0x01, result[2] );
@@ -85,7 +85,7 @@ public class IntSerializerTest
 
         // ------------------------------------------------------------------
         value = 0x0000FFFF;
-        result = serializer.serialize( value );
+        result = IntSerializer.serialize( value );
 
         assertEquals( ( byte ) 0xFF, result[3] );
         assertEquals( ( byte ) 0xFF, result[2] );
@@ -96,7 +96,7 @@ public class IntSerializerTest
 
         // ------------------------------------------------------------------
         value = 0x00010000;
-        result = serializer.serialize( value );
+        result = IntSerializer.serialize( value );
 
         assertEquals( ( byte ) 0x00, result[3] );
         assertEquals( ( byte ) 0x00, result[2] );
@@ -107,7 +107,7 @@ public class IntSerializerTest
 
         // ------------------------------------------------------------------
         value = 0x00FFFFFF;
-        result = serializer.serialize( value );
+        result = IntSerializer.serialize( value );
 
         assertEquals( ( byte ) 0xFF, result[3] );
         assertEquals( ( byte ) 0xFF, result[2] );
@@ -118,7 +118,7 @@ public class IntSerializerTest
 
         // ------------------------------------------------------------------
         value = 0x01000000;
-        result = serializer.serialize( value );
+        result = IntSerializer.serialize( value );
 
         assertEquals( ( byte ) 0x00, result[3] );
         assertEquals( ( byte ) 0x00, result[2] );
@@ -129,7 +129,7 @@ public class IntSerializerTest
 
         // ------------------------------------------------------------------
         value = 0x7FFFFFFF;
-        result = serializer.serialize( value );
+        result = IntSerializer.serialize( value );
 
         assertEquals( ( byte ) 0x00FF, result[3] );
         assertEquals( ( byte ) 0x00FF, result[2] );
@@ -140,7 +140,7 @@ public class IntSerializerTest
 
         // ------------------------------------------------------------------
         value = 0x80000000;
-        result = serializer.serialize( value );
+        result = IntSerializer.serialize( value );
 
         assertEquals( ( byte ) 0x00, result[3] );
         assertEquals( ( byte ) 0x00, result[2] );
@@ -151,7 +151,7 @@ public class IntSerializerTest
 
         // ------------------------------------------------------------------
         value = 0xFFFFFFFF;
-        result = serializer.serialize( value );
+        result = IntSerializer.serialize( value );
 
         assertEquals( ( byte ) 0xFF, result[3] );
         assertEquals( ( byte ) 0xFF, result[2] );

Modified: directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/serializer/LongSerializerTest.java
URL: http://svn.apache.org/viewvc/directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/serializer/LongSerializerTest.java?rev=1512386&r1=1512385&r2=1512386&view=diff
==============================================================================
--- directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/serializer/LongSerializerTest.java
(original)
+++ directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/serializer/LongSerializerTest.java
Fri Aug  9 16:36:45 2013
@@ -41,7 +41,7 @@ public class LongSerializerTest
     public void testLongSerializer() throws IOException
     {
         long value = 0x0000000000000000L;
-        byte[] result = serializer.serialize( value );
+        byte[] result = LongSerializer.serialize( value );
 
         assertEquals( ( byte ) 0x00, result[7] );
         assertEquals( ( byte ) 0x00, result[6] );
@@ -56,7 +56,7 @@ public class LongSerializerTest
 
         // ------------------------------------------------------------------
         value = 0x0000000000000001L;
-        result = serializer.serialize( value );
+        result = LongSerializer.serialize( value );
 
         assertEquals( ( byte ) 0x01, result[7] );
         assertEquals( ( byte ) 0x00, result[6] );
@@ -71,7 +71,7 @@ public class LongSerializerTest
 
         // ------------------------------------------------------------------
         value = 0x00000000000000FFL;
-        result = serializer.serialize( value );
+        result = LongSerializer.serialize( value );
 
         assertEquals( ( byte ) 0xFF, result[7] );
         assertEquals( ( byte ) 0x00, result[6] );
@@ -86,7 +86,7 @@ public class LongSerializerTest
 
         // ------------------------------------------------------------------
         value = 0x0000000000000100L;
-        result = serializer.serialize( value );
+        result = LongSerializer.serialize( value );
 
         assertEquals( ( byte ) 0x00, result[7] );
         assertEquals( ( byte ) 0x01, result[6] );
@@ -101,7 +101,7 @@ public class LongSerializerTest
 
         // ------------------------------------------------------------------
         value = 0x000000000000FFFFL;
-        result = serializer.serialize( value );
+        result = LongSerializer.serialize( value );
 
         assertEquals( ( byte ) 0xFF, result[7] );
         assertEquals( ( byte ) 0xFF, result[6] );
@@ -116,7 +116,7 @@ public class LongSerializerTest
 
         // ------------------------------------------------------------------
         value = 0x0000000000010000L;
-        result = serializer.serialize( value );
+        result = LongSerializer.serialize( value );
 
         assertEquals( ( byte ) 0x00, result[7] );
         assertEquals( ( byte ) 0x00, result[6] );
@@ -131,7 +131,7 @@ public class LongSerializerTest
 
         // ------------------------------------------------------------------
         value = 0x0000000000FFFFFFL;
-        result = serializer.serialize( value );
+        result = LongSerializer.serialize( value );
 
         assertEquals( ( byte ) 0xFF, result[7] );
         assertEquals( ( byte ) 0xFF, result[6] );
@@ -146,7 +146,7 @@ public class LongSerializerTest
 
         // ------------------------------------------------------------------
         value = 0x0000000001000000L;
-        result = serializer.serialize( value );
+        result = LongSerializer.serialize( value );
 
         assertEquals( ( byte ) 0x00, result[7] );
         assertEquals( ( byte ) 0x00, result[6] );
@@ -161,7 +161,7 @@ public class LongSerializerTest
 
         // ------------------------------------------------------------------
         value = 0x000000007FFFFFFFL;
-        result = serializer.serialize( value );
+        result = LongSerializer.serialize( value );
 
         assertEquals( ( byte ) 0xFF, result[7] );
         assertEquals( ( byte ) 0xFF, result[6] );
@@ -176,7 +176,7 @@ public class LongSerializerTest
 
         // ------------------------------------------------------------------
         value = 0x0000000080000000L;
-        result = serializer.serialize( value );
+        result = LongSerializer.serialize( value );
 
         assertEquals( ( byte ) 0x00, result[7] );
         assertEquals( ( byte ) 0x00, result[6] );
@@ -191,7 +191,7 @@ public class LongSerializerTest
 
         // ------------------------------------------------------------------
         value = 0x00000000FFFFFFFFL;
-        result = serializer.serialize( value );
+        result = LongSerializer.serialize( value );
 
         assertEquals( ( byte ) 0xFF, result[7] );
         assertEquals( ( byte ) 0xFF, result[6] );
@@ -206,7 +206,7 @@ public class LongSerializerTest
 
         // ------------------------------------------------------------------
         value = 0x0000000100000000L;
-        result = serializer.serialize( value );
+        result = LongSerializer.serialize( value );
 
         assertEquals( ( byte ) 0x00, result[7] );
         assertEquals( ( byte ) 0x00, result[6] );
@@ -221,7 +221,7 @@ public class LongSerializerTest
 
         // ------------------------------------------------------------------
         value = 0x000000FFFFFFFFFFL;
-        result = serializer.serialize( value );
+        result = LongSerializer.serialize( value );
 
         assertEquals( ( byte ) 0xFF, result[7] );
         assertEquals( ( byte ) 0xFF, result[6] );
@@ -236,7 +236,7 @@ public class LongSerializerTest
 
         // ------------------------------------------------------------------
         value = 0x0000010000000000L;
-        result = serializer.serialize( value );
+        result = LongSerializer.serialize( value );
 
         assertEquals( ( byte ) 0x00, result[7] );
         assertEquals( ( byte ) 0x00, result[6] );
@@ -251,7 +251,7 @@ public class LongSerializerTest
 
         // ------------------------------------------------------------------
         value = 0x0000FFFFFFFFFFFFL;
-        result = serializer.serialize( value );
+        result = LongSerializer.serialize( value );
 
         assertEquals( ( byte ) 0xFF, result[7] );
         assertEquals( ( byte ) 0xFF, result[6] );
@@ -266,7 +266,7 @@ public class LongSerializerTest
 
         // ------------------------------------------------------------------
         value = 0x0001000000000000L;
-        result = serializer.serialize( value );
+        result = LongSerializer.serialize( value );
 
         assertEquals( ( byte ) 0x00, result[7] );
         assertEquals( ( byte ) 0x00, result[6] );
@@ -281,7 +281,7 @@ public class LongSerializerTest
 
         // ------------------------------------------------------------------
         value = 0x00FFFFFFFFFFFFFFL;
-        result = serializer.serialize( value );
+        result = LongSerializer.serialize( value );
 
         assertEquals( ( byte ) 0xFF, result[7] );
         assertEquals( ( byte ) 0xFF, result[6] );
@@ -296,7 +296,7 @@ public class LongSerializerTest
 
         // ------------------------------------------------------------------
         value = 0x0100000000000000L;
-        result = serializer.serialize( value );
+        result = LongSerializer.serialize( value );
 
         assertEquals( ( byte ) 0x00, result[7] );
         assertEquals( ( byte ) 0x00, result[6] );
@@ -311,7 +311,7 @@ public class LongSerializerTest
 
         // ------------------------------------------------------------------
         value = 0x7FFFFFFFFFFFFFFFL;
-        result = serializer.serialize( value );
+        result = LongSerializer.serialize( value );
 
         assertEquals( ( byte ) 0xFF, result[7] );
         assertEquals( ( byte ) 0xFF, result[6] );
@@ -326,7 +326,7 @@ public class LongSerializerTest
 
         // ------------------------------------------------------------------
         value = 0x8000000000000000L;
-        result = serializer.serialize( value );
+        result = LongSerializer.serialize( value );
 
         assertEquals( ( byte ) 0x00, result[7] );
         assertEquals( ( byte ) 0x00, result[6] );
@@ -341,7 +341,7 @@ public class LongSerializerTest
 
         // ------------------------------------------------------------------
         value = 0xFFFFFFFFFFFFFFFFL;
-        result = serializer.serialize( value );
+        result = LongSerializer.serialize( value );
 
         assertEquals( ( byte ) 0xFF, result[7] );
         assertEquals( ( byte ) 0xFF, result[6] );

Modified: directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/serializer/ShortSerializerTest.java
URL: http://svn.apache.org/viewvc/directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/serializer/ShortSerializerTest.java?rev=1512386&r1=1512385&r2=1512386&view=diff
==============================================================================
--- directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/serializer/ShortSerializerTest.java
(original)
+++ directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/serializer/ShortSerializerTest.java
Fri Aug  9 16:36:45 2013
@@ -41,7 +41,7 @@ public class ShortSerializerTest
     public void testShortSerializer() throws IOException
     {
         short value = 0x0000;
-        byte[] result = serializer.serialize( value );
+        byte[] result = ShortSerializer.serialize( value );
 
         assertEquals( ( byte ) 0x00, result[1] );
         assertEquals( ( byte ) 0x00, result[0] );
@@ -50,7 +50,7 @@ public class ShortSerializerTest
 
         // ------------------------------------------------------------------
         value = 0x0001;
-        result = serializer.serialize( value );
+        result = ShortSerializer.serialize( value );
 
         assertEquals( ( byte ) 0x01, result[1] );
         assertEquals( ( byte ) 0x00, result[0] );
@@ -59,7 +59,7 @@ public class ShortSerializerTest
 
         // ------------------------------------------------------------------
         value = 0x00FF;
-        result = serializer.serialize( value );
+        result = ShortSerializer.serialize( value );
 
         assertEquals( ( byte ) 0xFF, result[1] );
         assertEquals( ( byte ) 0x00, result[0] );
@@ -68,7 +68,7 @@ public class ShortSerializerTest
 
         // ------------------------------------------------------------------
         value = 0x0100;
-        result = serializer.serialize( value );
+        result = ShortSerializer.serialize( value );
 
         assertEquals( ( byte ) 0x00, result[1] );
         assertEquals( ( byte ) 0x01, result[0] );
@@ -77,7 +77,7 @@ public class ShortSerializerTest
 
         // ------------------------------------------------------------------
         value = 0x7FFF;
-        result = serializer.serialize( value );
+        result = ShortSerializer.serialize( value );
 
         assertEquals( ( byte ) 0xFF, result[1] );
         assertEquals( ( byte ) 0x7F, result[0] );
@@ -86,7 +86,7 @@ public class ShortSerializerTest
 
         // ------------------------------------------------------------------
         value = ( short ) 0x8000;
-        result = serializer.serialize( value );
+        result = ShortSerializer.serialize( value );
 
         assertEquals( ( byte ) 0x00, result[1] );
         assertEquals( ( byte ) 0x80, result[0] );
@@ -95,7 +95,7 @@ public class ShortSerializerTest
 
         // ------------------------------------------------------------------
         value = ( short ) 0xFFFF;
-        result = serializer.serialize( value );
+        result = ShortSerializer.serialize( value );
 
         assertEquals( ( byte ) 0xFF, result[1] );
         assertEquals( ( byte ) 0xFF, result[0] );



Mime
View raw message