< prev index next >

modules/controls/src/test/java/javafx/scene/chart/BarChartTest.java

Print this page
rev 8858 : RT-40544: Updating BarChart data causes memory leak


 113     }
 114     
 115     @Test
 116     public void testRemoveAndAddSameSeriesBeforeAnimationCompletes() {
 117         startApp();
 118         assertEquals(2, bc.getData().size());
 119         // remove and add the same series.
 120         bc.getData().add(bc.getData().remove(0));
 121         pulse();
 122         assertEquals(2, bc.getData().size());
 123     }
 124     
 125     @Test
 126     public void testRemoveAndAddSameDataBeforeAnimationCompletes() {
 127         startApp();
 128         Series s = bc.getData().get(0);
 129         assertEquals(3, s.getDataSize());
 130         s.getData().add(s.getData().remove(0));
 131         assertEquals(3, s.getDataSize());
 132     }










 133 }


 113     }
 114     
 115     @Test
 116     public void testRemoveAndAddSameSeriesBeforeAnimationCompletes() {
 117         startApp();
 118         assertEquals(2, bc.getData().size());
 119         // remove and add the same series.
 120         bc.getData().add(bc.getData().remove(0));
 121         pulse();
 122         assertEquals(2, bc.getData().size());
 123     }
 124     
 125     @Test
 126     public void testRemoveAndAddSameDataBeforeAnimationCompletes() {
 127         startApp();
 128         Series s = bc.getData().get(0);
 129         assertEquals(3, s.getDataSize());
 130         s.getData().add(s.getData().remove(0));
 131         assertEquals(3, s.getDataSize());
 132     }
 133 
 134     @Test
 135     public void testRemoveNotAnimated() {
 136         startApp();
 137         bc.setAnimated(false);
 138         Series s = bc.getData().get(0);
 139         assertEquals(3, s.getDataSize());
 140         s.getData().remove(0);
 141         assertEquals(2, s.getDataSize());
 142     }
 143 }
< prev index next >