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

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


    @Test
    public void testCharComparator()
    {
        CharComparator comparator = new CharComparator();

        assertEquals( 0, comparator.compare( null, null ) );
        assertEquals( 0, comparator.compare( 'a', 'a' ) );
        assertEquals( 0, comparator.compare( '\u00e9', '\u00e9' ) );
        assertEquals( 1, comparator.compare( 'a', null ) );
        assertEquals( -1, comparator.compare( 'A', 'a' ) );
        assertEquals( 1, comparator.compare( 'a', 'A' ) );
View Full Code Here


    public void testCharComparator()
    {
        CharComparator comparator = new CharComparator();

        assertEquals( 0, comparator.compare( null, null ) );
        assertEquals( 0, comparator.compare( 'a', 'a' ) );
        assertEquals( 0, comparator.compare( '\u00e9', '\u00e9' ) );
        assertEquals( 1, comparator.compare( 'a', null ) );
        assertEquals( -1, comparator.compare( 'A', 'a' ) );
        assertEquals( 1, comparator.compare( 'a', 'A' ) );
        assertEquals( -1, comparator.compare( null, 'a' ) );
View Full Code Here

    {
        CharComparator comparator = new CharComparator();

        assertEquals( 0, comparator.compare( null, null ) );
        assertEquals( 0, comparator.compare( 'a', 'a' ) );
        assertEquals( 0, comparator.compare( '\u00e9', '\u00e9' ) );
        assertEquals( 1, comparator.compare( 'a', null ) );
        assertEquals( -1, comparator.compare( 'A', 'a' ) );
        assertEquals( 1, comparator.compare( 'a', 'A' ) );
        assertEquals( -1, comparator.compare( null, 'a' ) );
        assertEquals( -1, comparator.compare( 'a', 'b' ) );
View Full Code Here

        CharComparator comparator = new CharComparator();

        assertEquals( 0, comparator.compare( null, null ) );
        assertEquals( 0, comparator.compare( 'a', 'a' ) );
        assertEquals( 0, comparator.compare( '\u00e9', '\u00e9' ) );
        assertEquals( 1, comparator.compare( 'a', null ) );
        assertEquals( -1, comparator.compare( 'A', 'a' ) );
        assertEquals( 1, comparator.compare( 'a', 'A' ) );
        assertEquals( -1, comparator.compare( null, 'a' ) );
        assertEquals( -1, comparator.compare( 'a', 'b' ) );
    }
View Full Code Here

        assertEquals( 0, comparator.compare( null, null ) );
        assertEquals( 0, comparator.compare( 'a', 'a' ) );
        assertEquals( 0, comparator.compare( '\u00e9', '\u00e9' ) );
        assertEquals( 1, comparator.compare( 'a', null ) );
        assertEquals( -1, comparator.compare( 'A', 'a' ) );
        assertEquals( 1, comparator.compare( 'a', 'A' ) );
        assertEquals( -1, comparator.compare( null, 'a' ) );
        assertEquals( -1, comparator.compare( 'a', 'b' ) );
    }
}
View Full Code Here

        assertEquals( 0, comparator.compare( null, null ) );
        assertEquals( 0, comparator.compare( 'a', 'a' ) );
        assertEquals( 0, comparator.compare( '\u00e9', '\u00e9' ) );
        assertEquals( 1, comparator.compare( 'a', null ) );
        assertEquals( -1, comparator.compare( 'A', 'a' ) );
        assertEquals( 1, comparator.compare( 'a', 'A' ) );
        assertEquals( -1, comparator.compare( null, 'a' ) );
        assertEquals( -1, comparator.compare( 'a', 'b' ) );
    }
}
View Full Code Here

        assertEquals( 0, comparator.compare( 'a', 'a' ) );
        assertEquals( 0, comparator.compare( '\u00e9', '\u00e9' ) );
        assertEquals( 1, comparator.compare( 'a', null ) );
        assertEquals( -1, comparator.compare( 'A', 'a' ) );
        assertEquals( 1, comparator.compare( 'a', 'A' ) );
        assertEquals( -1, comparator.compare( null, 'a' ) );
        assertEquals( -1, comparator.compare( 'a', 'b' ) );
    }
}
View Full Code Here

        assertEquals( 0, comparator.compare( '\u00e9', '\u00e9' ) );
        assertEquals( 1, comparator.compare( 'a', null ) );
        assertEquals( -1, comparator.compare( 'A', 'a' ) );
        assertEquals( 1, comparator.compare( 'a', 'A' ) );
        assertEquals( -1, comparator.compare( null, 'a' ) );
        assertEquals( -1, comparator.compare( 'a', 'b' ) );
    }
}
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.