Package org.rococoa.cocoa.foundation

Examples of org.rococoa.cocoa.foundation.NSMutableIndexSet


*/
public class NSIndexSetTest extends RococoaTestCase {

    @Test
    public void testIndexWithRange() {
        NSMutableIndexSet index = NSMutableIndexSet.new_();
        index.addIndex(new NSUInteger(1));
        index.addIndex(new NSUInteger(2));
        assertEquals(new NSUInteger(2), index.count());
        assertFalse(index.containsIndex(new NSUInteger(0)));
        assertTrue(index.containsIndex(new NSUInteger(1)));
        assertTrue(index.containsIndex(new NSUInteger(2)));
        assertFalse(index.containsIndex(new NSUInteger(3)));
    }
View Full Code Here


        assertFalse(index.containsIndex(new NSUInteger(3)));
    }

    @Test
    public void testIndexWithDoubleRange() {
        NSMutableIndexSet index = NSMutableIndexSet.new_();
        index.addIndex(new NSUInteger(1));
        index.addIndex(new NSUInteger(2));
        index.addIndex(new NSUInteger(4));
        index.addIndex(new NSUInteger(5));
        assertEquals(new NSUInteger(4), index.count());
        assertFalse(index.containsIndex(new NSUInteger(0)));
        assertTrue(index.containsIndex(new NSUInteger(1)));
        assertTrue(index.containsIndex(new NSUInteger(2)));
        assertFalse(index.containsIndex(new NSUInteger(3)));
        assertTrue(index.containsIndex(new NSUInteger(4)));
        assertTrue(index.containsIndex(new NSUInteger(5)));
    }
View Full Code Here

TOP

Related Classes of org.rococoa.cocoa.foundation.NSMutableIndexSet

Copyright © 2018 www.massapicom. 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.