Package org.apache.directory.mavibot.btree.comparator

Examples of org.apache.directory.mavibot.btree.comparator.IntArrayComparator.compare()


    public void testIntArrayComparator()
    {
        IntArrayComparator comparator = new IntArrayComparator();

        // Check equality
        assertEquals( 0, comparator.compare( null, null ) );
        assertEquals( 0, comparator.compare( new int[]
            {}, new int[]
            {} ) );
        assertEquals( 0, comparator.compare( new int[]
            { 1, 2 }, new int[]
View Full Code Here


    {
        IntArrayComparator comparator = new IntArrayComparator();

        // Check equality
        assertEquals( 0, comparator.compare( null, null ) );
        assertEquals( 0, comparator.compare( new int[]
            {}, new int[]
            {} ) );
        assertEquals( 0, comparator.compare( new int[]
            { 1, 2 }, new int[]
            { 1, 2 } ) );
View Full Code Here

        // Check equality
        assertEquals( 0, comparator.compare( null, null ) );
        assertEquals( 0, comparator.compare( new int[]
            {}, new int[]
            {} ) );
        assertEquals( 0, comparator.compare( new int[]
            { 1, 2 }, new int[]
            { 1, 2 } ) );

        // The first int[] is > the second
        assertEquals( 1, comparator.compare( new int[]
View Full Code Here

        assertEquals( 0, comparator.compare( new int[]
            { 1, 2 }, new int[]
            { 1, 2 } ) );

        // The first int[] is > the second
        assertEquals( 1, comparator.compare( new int[]
            {}, null ) );
        assertEquals( 1, comparator.compare( new int[]
            { 1 }, null ) );
        assertEquals( 1, comparator.compare( new int[]
            { 1, 2 }, new int[]
View Full Code Here

            { 1, 2 } ) );

        // The first int[] is > the second
        assertEquals( 1, comparator.compare( new int[]
            {}, null ) );
        assertEquals( 1, comparator.compare( new int[]
            { 1 }, null ) );
        assertEquals( 1, comparator.compare( new int[]
            { 1, 2 }, new int[]
            { 1, 1 } ) );
        assertEquals( 1, comparator.compare( new int[]
View Full Code Here

        // The first int[] is > the second
        assertEquals( 1, comparator.compare( new int[]
            {}, null ) );
        assertEquals( 1, comparator.compare( new int[]
            { 1 }, null ) );
        assertEquals( 1, comparator.compare( new int[]
            { 1, 2 }, new int[]
            { 1, 1 } ) );
        assertEquals( 1, comparator.compare( new int[]
            { 1, 2, 1 }, new int[]
            { 1, 2 } ) );
View Full Code Here

        assertEquals( 1, comparator.compare( new int[]
            { 1 }, null ) );
        assertEquals( 1, comparator.compare( new int[]
            { 1, 2 }, new int[]
            { 1, 1 } ) );
        assertEquals( 1, comparator.compare( new int[]
            { 1, 2, 1 }, new int[]
            { 1, 2 } ) );
        assertEquals( 1, comparator.compare( new int[]
            { 1, 2 }, new int[]
            { 1, 1, 2 } ) );
View Full Code Here

            { 1, 2 }, new int[]
            { 1, 1 } ) );
        assertEquals( 1, comparator.compare( new int[]
            { 1, 2, 1 }, new int[]
            { 1, 2 } ) );
        assertEquals( 1, comparator.compare( new int[]
            { 1, 2 }, new int[]
            { 1, 1, 2 } ) );

        // The first int[] is < the second
        assertEquals( -1, comparator.compare( null, new int[]
View Full Code Here

        assertEquals( 1, comparator.compare( new int[]
            { 1, 2 }, new int[]
            { 1, 1, 2 } ) );

        // The first int[] is < the second
        assertEquals( -1, comparator.compare( null, new int[]
            {} ) );
        assertEquals( -1, comparator.compare( null, new int[]
            { 1, 2 } ) );
        assertEquals( -1, comparator.compare( null, new int[]
            { -1, 2 } ) );
View Full Code Here

            { 1, 1, 2 } ) );

        // The first int[] is < the second
        assertEquals( -1, comparator.compare( null, new int[]
            {} ) );
        assertEquals( -1, comparator.compare( null, new int[]
            { 1, 2 } ) );
        assertEquals( -1, comparator.compare( null, new int[]
            { -1, 2 } ) );
        assertEquals( -1, comparator.compare( new int[]
            {}, new int[]
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.