use of org.eclipse.linuxtools.systemtap.graphing.core.datasets.table.TableEntry in project linuxtools by eclipse.
the class FilteredTableDataSetTest method testClearFilters.
@Test
public void testClearFilters() {
TableEntry entry;
entry = new TableEntry();
entry.add(new Integer[] { 3, 2, 5 });
dataSet.append(entry);
entry = new TableEntry();
entry.add(new Integer[] { 4, 2, 3 });
dataSet.append(entry);
entry = new TableEntry();
entry.add(new Integer[] { 7, 2, 9 });
dataSet.append(entry);
entry = new TableEntry();
entry.add(new Integer[] { 2, 2, 6 });
dataSet.append(entry);
entry = new TableEntry();
entry.add(new Integer[] { 5, 2, 2 });
dataSet.append(entry);
dataSet.addFilter(new RangeFilter(0, 3, 5, RangeFilter.INCLUSIVE | RangeFilter.INSIDE_BOUNDS));
dataSet.addFilter(new SortFilter(2, SortFilter.ASCENDING));
assertEquals(2, dataSet.getFilters().length);
dataSet.clearFilters();
assertEquals(1, dataSet.getRowCount());
Object[] row = dataSet.getRow(0);
assertEquals(5, ((Integer) row[0]).intValue());
assertEquals(2, ((Integer) row[2]).intValue());
assertEquals(0, dataSet.getFilters().length);
}
use of org.eclipse.linuxtools.systemtap.graphing.core.datasets.table.TableEntry in project linuxtools by eclipse.
the class TableDataSetTest method setUp.
@Before
public void setUp() {
data = new TableDataSet(new String[] { "a", "b", "c" });
entry0 = new TableEntry();
entry0.putRow(0, new String[] { "1", "2", "3" });
data.setData(entry0);
TableEntry entry = new TableEntry();
entry.putRow(0, new String[] { "4", "5", "6" });
data.setData(entry);
}
use of org.eclipse.linuxtools.systemtap.graphing.core.datasets.table.TableEntry in project linuxtools by eclipse.
the class TableDataSetTest method testRemove.
@Test
public void testRemove() {
assertFalse(data.remove(null));
assertFalse(data.remove(new TableEntry()));
assertFalse(data.remove(-1));
assertFalse(data.remove(10));
assertEquals(2, data.getEntryCount());
IDataEntry entry = data.getEntry(0);
assertTrue(data.remove(entry));
assertEquals(1, data.getEntryCount());
assertFalse(data.remove(entry));
assertTrue(data.remove(0));
}
use of org.eclipse.linuxtools.systemtap.graphing.core.datasets.table.TableEntry in project linuxtools by eclipse.
the class TableEntryTest method testGetRowCount.
@Test
public void testGetRowCount() {
TableEntry entry2 = new TableEntry();
assertEquals(0, entry2.getRowCount());
entry2 = new TableEntry();
entry2.putRow(0, null);
assertEquals(0, entry2.getRowCount());
assertEquals(2, entry.getRowCount());
}
use of org.eclipse.linuxtools.systemtap.graphing.core.datasets.table.TableEntry in project linuxtools by eclipse.
the class TableEntryTest method setUp.
@Before
public void setUp() {
entry = new TableEntry();
data = new Integer[] { 2, 5, 4 };
entry.add(data);
data = new Integer[] { 5, 1, 3 };
entry.add(data);
}
Aggregations