Search in sources :

Example 1 with CEventValueTableModel

use of com.google.security.zynamics.binnavi.Gui.Debug.EventLists.CEventValueTableModel in project binnavi by google.

the class CEventValueTableModelTest method foo.

@Test
public void foo() {
    final CEventValueTableModel model = new CEventValueTableModel();
    final INaviModule mockModule = new MockModule();
    final TraceEvent event = new TraceEvent(77, new BreakpointAddress(mockModule, new UnrelocatedAddress(new CAddress(0x123))), TraceEventType.REGULAR_BREAKPOINT, Lists.newArrayList(new TraceRegister("eax", new CAddress(0x123), new byte[] { 05, 06, 07 })));
    assertEquals(0, model.getRowCount());
    model.setEvent(event);
    assertEquals(1, model.getRowCount());
    assertEquals("eax", model.getValueAt(0, 0));
    assertEquals("00000123", model.getValueAt(0, 1));
    assertEquals("05 06 07", model.getValueAt(0, 2));
}
Also used : INaviModule(com.google.security.zynamics.binnavi.disassembly.INaviModule) MockModule(com.google.security.zynamics.binnavi.disassembly.Modules.MockModule) UnrelocatedAddress(com.google.security.zynamics.binnavi.disassembly.UnrelocatedAddress) TraceRegister(com.google.security.zynamics.binnavi.debug.models.trace.TraceRegister) BreakpointAddress(com.google.security.zynamics.binnavi.debug.models.breakpoints.BreakpointAddress) CEventValueTableModel(com.google.security.zynamics.binnavi.Gui.Debug.EventLists.CEventValueTableModel) TraceEvent(com.google.security.zynamics.binnavi.debug.models.trace.TraceEvent) CAddress(com.google.security.zynamics.zylib.disassembly.CAddress) Test(org.junit.Test)

Aggregations

CEventValueTableModel (com.google.security.zynamics.binnavi.Gui.Debug.EventLists.CEventValueTableModel)1 BreakpointAddress (com.google.security.zynamics.binnavi.debug.models.breakpoints.BreakpointAddress)1 TraceEvent (com.google.security.zynamics.binnavi.debug.models.trace.TraceEvent)1 TraceRegister (com.google.security.zynamics.binnavi.debug.models.trace.TraceRegister)1 INaviModule (com.google.security.zynamics.binnavi.disassembly.INaviModule)1 MockModule (com.google.security.zynamics.binnavi.disassembly.Modules.MockModule)1 UnrelocatedAddress (com.google.security.zynamics.binnavi.disassembly.UnrelocatedAddress)1 CAddress (com.google.security.zynamics.zylib.disassembly.CAddress)1 Test (org.junit.Test)1