1 package org.apache.poi.util; 2 3 import junit.framework.TestCase; 4 5 8 public class TestDoubleList2d 9 extends TestCase 10 { 11 public void testAccess() 12 throws Exception 13 { 14 DoubleList2d array = new DoubleList2d(); 15 assertEquals( 0, array.get( 0, 0 ), 0.00001 ); 16 assertEquals( 0, array.get( 1, 1 ), 0.00001 ); 17 assertEquals( 0, array.get( 100, 100 ), 0.00001 ); 18 array.set( 100, 100, 999 ); 19 assertEquals( 999, array.get( 100, 100 ), 0.00001 ); 20 assertEquals( 0, array.get( 0, 0 ), 0.00001 ); 21 array.set( 0, 0, 999 ); 22 assertEquals( 999, array.get( 0, 0 ), 0.00001 ); 23 24 try 25 { 26 array.get( -1, -1 ); 27 fail(); 28 } 29 catch ( ArrayIndexOutOfBoundsException e ) 30 { 31 } 33 } 34 } 35 | Popular Tags |