use of org.eclipse.linuxtools.systemtap.graphing.core.datasets.table.TableEntry in project linuxtools by eclipse.
the class FilteredTableDataSetTest method testRemoveFilter.
@Test
public void testRemoveFilter() {
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);
RangeFilter filter = new RangeFilter(0, 3, 5, RangeFilter.INCLUSIVE | RangeFilter.INSIDE_BOUNDS);
dataSet.addFilter(filter);
dataSet.addFilter(new SortFilter(2, SortFilter.ASCENDING));
dataSet.removeFilter(filter);
assertEquals(1, dataSet.getRowCount());
Object[] row = dataSet.getRow(0);
assertEquals(5, ((Integer) row[0]).intValue());
assertEquals(2, ((Integer) row[2]).intValue());
}
use of org.eclipse.linuxtools.systemtap.graphing.core.datasets.table.TableEntry in project linuxtools by eclipse.
the class FilteredTableDataSetTest method testGetData.
@Test
public void testGetData() {
TableEntry entry = new TableEntry();
entry.add(new String[] { "1", "2", "3" });
data.append(entry);
Object[][] d = dataSet.getData();
assertNotNull(d);
assertEquals(1, d.length);
assertEquals("3", d[0][2]);
}
use of org.eclipse.linuxtools.systemtap.graphing.core.datasets.table.TableEntry in project linuxtools by eclipse.
the class TableDataSetTest method testSetData.
@Test
public void testSetData() {
assertEquals(2, data.getEntryCount());
TableEntry entry = new TableEntry();
entry.putRow(0, new String[] { "1", "2", "3" });
data.setData(entry);
assertEquals(3, data.getEntryCount());
}
use of org.eclipse.linuxtools.systemtap.graphing.core.datasets.table.TableEntry in project linuxtools by eclipse.
the class TableDataSetTest method testAppend.
@Test
public void testAppend() {
assertEquals(2, data.getEntryCount());
TableEntry entry = new TableEntry();
entry.putRow(0, new String[] { "1", "2", "3" });
data.append(entry);
assertEquals(3, data.getEntryCount());
}
use of org.eclipse.linuxtools.systemtap.graphing.core.datasets.table.TableEntry in project linuxtools by eclipse.
the class TableEntryTest method testGetColCount.
@Test
public void testGetColCount() {
TableEntry entry2 = new TableEntry();
assertEquals(0, entry2.getColCount());
entry2 = new TableEntry();
entry2.putRow(0, null);
assertEquals(0, entry2.getColCount());
assertEquals(3, entry.getColCount());
}
Aggregations