FileDocCategorySizeDatePackage
TestList2d.javaAPI DocApache Poi 3.0.11692Sun Mar 11 12:59:28 GMT 2007org.apache.poi.util

TestList2d

public class TestList2d extends TestCase
version
$Id: TestList2d.java 496532 2007-01-15 23:00:17Z markt $

Fields Summary
Constructors Summary
Methods Summary
public voidtestAccess()

        Object objectA = new Object();
        Object objectB = new Object();

        List2d array = new List2d();
        assertNull( array.get( 0, 0 ) );
        assertNull( array.get( 1, 1 ) );
        assertNull( array.get( 100, 100 ) );
        array.set( 100, 100, objectA );
        assertSame( objectA, array.get( 100, 100 ) );
        assertNull( array.get( 0, 0 ) );
        array.set( 0, 0, objectB );
        assertSame( objectB, array.get( 0, 0 ) );

        try
        {
            array.get( -1, -1 );
            fail();
        }
        catch ( ArrayIndexOutOfBoundsException e )
        {
            // pass
        }