Search in sources :

Example 16 with CNaviViewEdge

use of com.google.security.zynamics.binnavi.disassembly.CNaviViewEdge in project binnavi by google.

the class ZyGraphTest method createEdgeForAddedEdgeTests.

private Pair<CNaviViewEdge, com.google.security.zynamics.binnavi.yfileswrap.zygraph.NaviEdge> createEdgeForAddedEdgeTests() {
    final INaviViewNode source = m_view.getGraph().getNodes().get(0);
    final INaviViewNode target = m_view.getGraph().getNodes().get(1);
    final CNaviViewEdge edge = m_graph.getRawView().getContent().createEdge(source, target, EdgeType.ENTER_INLINED_FUNCTION);
    final com.google.security.zynamics.binnavi.yfileswrap.zygraph.NaviEdge cnn = searchEdge(getEdges(m_graph), edge);
    return new Pair<CNaviViewEdge, com.google.security.zynamics.binnavi.yfileswrap.zygraph.NaviEdge>(edge, cnn);
}
Also used : CNaviViewEdge(com.google.security.zynamics.binnavi.disassembly.CNaviViewEdge) INaviViewNode(com.google.security.zynamics.binnavi.disassembly.INaviViewNode) Pair(com.google.security.zynamics.zylib.general.Pair)

Example 17 with CNaviViewEdge

use of com.google.security.zynamics.binnavi.disassembly.CNaviViewEdge in project binnavi by google.

the class ZyGraphTest method testAddedEdgeCheckVisibility.

@Test
public void testAddedEdgeCheckVisibility() {
    final Pair<CNaviViewEdge, com.google.security.zynamics.binnavi.yfileswrap.zygraph.NaviEdge> p = createEdgeForAddedEdgeTests();
    final CNaviViewEdge edge = p.first();
    final com.google.security.zynamics.binnavi.yfileswrap.zygraph.NaviEdge cnn = p.second();
    assertTrue(edge.isVisible());
    assertEquals(edge.isVisible(), cnn.isVisible());
    edge.setVisible(false);
    assertFalse(edge.isVisible());
    assertEquals(edge.isVisible(), cnn.isVisible());
    edge.setVisible(true);
    assertTrue(edge.isVisible());
    assertEquals(edge.isVisible(), cnn.isVisible());
}
Also used : CNaviViewEdge(com.google.security.zynamics.binnavi.disassembly.CNaviViewEdge) Test(org.junit.Test)

Example 18 with CNaviViewEdge

use of com.google.security.zynamics.binnavi.disassembly.CNaviViewEdge in project binnavi by google.

the class ZyGraphTest method testAddedEdgeCheckSelection.

@Test
public void testAddedEdgeCheckSelection() {
    final Pair<CNaviViewEdge, com.google.security.zynamics.binnavi.yfileswrap.zygraph.NaviEdge> p = createEdgeForAddedEdgeTests();
    final CNaviViewEdge edge = p.first();
    final com.google.security.zynamics.binnavi.yfileswrap.zygraph.NaviEdge cnn = p.second();
    assertFalse(edge.isSelected());
    assertEquals(edge.isSelected(), cnn.isSelected());
    edge.setSelected(false);
    assertFalse(edge.isSelected());
    assertEquals(edge.isSelected(), cnn.isSelected());
    edge.setSelected(true);
    assertTrue(edge.isSelected());
    assertEquals(edge.isSelected(), cnn.isSelected());
}
Also used : CNaviViewEdge(com.google.security.zynamics.binnavi.disassembly.CNaviViewEdge) Test(org.junit.Test)

Aggregations

CNaviViewEdge (com.google.security.zynamics.binnavi.disassembly.CNaviViewEdge)18 Test (org.junit.Test)11 INaviViewNode (com.google.security.zynamics.binnavi.disassembly.INaviViewNode)8 CCodeNode (com.google.security.zynamics.binnavi.disassembly.CCodeNode)7 CBend (com.google.security.zynamics.zylib.gui.zygraph.edges.CBend)7 CTag (com.google.security.zynamics.binnavi.Tagging.CTag)6 INaviEdge (com.google.security.zynamics.binnavi.disassembly.INaviEdge)6 IComment (com.google.security.zynamics.binnavi.Gui.GraphWindows.CommentDialogs.Interfaces.IComment)5 INaviFunction (com.google.security.zynamics.binnavi.disassembly.INaviFunction)5 MockFunction (com.google.security.zynamics.binnavi.disassembly.MockFunction)5 MockInstruction (com.google.security.zynamics.binnavi.disassembly.MockInstruction)5 INaviCodeNode (com.google.security.zynamics.binnavi.disassembly.INaviCodeNode)4 MockView (com.google.security.zynamics.binnavi.disassembly.MockView)4 FilledList (com.google.security.zynamics.zylib.types.lists.FilledList)4 CComment (com.google.security.zynamics.binnavi.Gui.GraphWindows.CommentDialogs.CComment)3 IUser (com.google.security.zynamics.binnavi.Gui.Users.Interfaces.IUser)3 CTextNode (com.google.security.zynamics.binnavi.disassembly.CTextNode)3 ExpensiveBaseTest (com.google.security.zynamics.binnavi.disassembly.types.ExpensiveBaseTest)3 ArrayList (java.util.ArrayList)3 UniqueTestUserGenerator (com.google.security.zynamics.binnavi.Database.PostgreSQL.UniqueTestUserGenerator)2