@author Edward Raff
| 15 | * @author Edward Raff |
| 16 | */ |
| 17 | public class SparseVectorTest |
| 18 | { |
| 19 | private SparseVector x; |
| 20 | private SparseVector y; |
| 21 | |
| 22 | public SparseVectorTest() |
| 23 | { |
| 24 | } |
| 25 | |
| 26 | @BeforeClass |
| 27 | public static void setUpClass() |
| 28 | { |
| 29 | } |
| 30 | |
| 31 | @AfterClass |
| 32 | public static void tearDownClass() |
| 33 | { |
| 34 | } |
| 35 | |
| 36 | @Before |
| 37 | public void setUp() |
| 38 | { |
| 39 | x = new SparseVector(20); |
| 40 | x.set(0, 2.0); |
| 41 | x.set(3, 4.0); |
| 42 | x.set(7, 1.0); |
| 43 | x.set(10, 2.0); |
| 44 | x.set(15, 3.0); |
| 45 | x.set(18, 2.0); |
| 46 | x.set(19, 5.0); |
| 47 | |
| 48 | y = new SparseVector(20); |
| 49 | y.set(1, 2.0); |
| 50 | y.set(3, 4.0); |
| 51 | y.set(8, 1.0); |
| 52 | y.set(9, 1.0); |
| 53 | y.set(10, 2.0); |
| 54 | y.set(15, 3.0); |
| 55 | y.set(17, 2.0); |
| 56 | y.set(18, 5.0); |
| 57 | } |
| 58 | |
| 59 | @After |
| 60 | public void tearDown() |
| 61 | { |
| 62 | } |
| 63 | |
| 64 | /** |
| 65 | * Test of length method, of class SparseVector. |
| 66 | */ |
| 67 | @Test |
| 68 | public void testLength() |
| 69 | { |
| 70 | System.out.println("length"); |
| 71 | assertEquals(20, x.length()); |
| 72 | assertEquals(20, y.length()); |
| 73 | } |
| 74 |
nothing calls this directly
no outgoing calls
no test coverage detected