Search in sources :

Example 16 with MockFunction

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

the class CCrossReferencesModelTest method test5ValueAt.

@Test
public void test5ValueAt() {
    final CCrossReferencesModel model = new CCrossReferencesModel();
    final CCrossReference reference = new CCrossReference(new MockFunction(), new MockFunction());
    final List<CCrossReference> crossReferences = new ArrayList<CCrossReference>();
    crossReferences.add(reference);
    model.setCrossReferences(crossReferences);
    assertEquals("Mock Function", model.getValueAt(0, 0));
    assertEquals("Mock Function", model.getValueAt(0, 1));
}
Also used : CCrossReference(com.google.security.zynamics.binnavi.Gui.GraphWindows.BottomPanel.CrossReferences.CCrossReference) MockFunction(com.google.security.zynamics.binnavi.disassembly.MockFunction) ArrayList(java.util.ArrayList) CCrossReferencesModel(com.google.security.zynamics.binnavi.Gui.GraphWindows.BottomPanel.CrossReferences.CCrossReferencesModel) Test(org.junit.Test)

Example 17 with MockFunction

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

the class CCrossReferencesModelTest method test1Simple.

@Test
public void test1Simple() {
    final CCrossReferencesModel model = new CCrossReferencesModel();
    final CCrossReference reference = new CCrossReference(new MockFunction(), new MockFunction());
    final List<CCrossReference> crossReferences = new ArrayList<CCrossReference>();
    crossReferences.add(reference);
    model.setCrossReferences(crossReferences);
}
Also used : CCrossReference(com.google.security.zynamics.binnavi.Gui.GraphWindows.BottomPanel.CrossReferences.CCrossReference) MockFunction(com.google.security.zynamics.binnavi.disassembly.MockFunction) ArrayList(java.util.ArrayList) CCrossReferencesModel(com.google.security.zynamics.binnavi.Gui.GraphWindows.BottomPanel.CrossReferences.CCrossReferencesModel) Test(org.junit.Test)

Example 18 with MockFunction

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

the class CCrossReferencesModelTest method test3getCoulmName.

@Test
public void test3getCoulmName() {
    final CCrossReferencesModel model = new CCrossReferencesModel();
    final CCrossReference reference = new CCrossReference(new MockFunction(), new MockFunction());
    final List<CCrossReference> crossReferences = new ArrayList<CCrossReference>();
    crossReferences.add(reference);
    model.setCrossReferences(crossReferences);
    assertEquals("Called Function", model.getColumnName(0));
    assertEquals("Calling Function", model.getColumnName(1));
}
Also used : CCrossReference(com.google.security.zynamics.binnavi.Gui.GraphWindows.BottomPanel.CrossReferences.CCrossReference) MockFunction(com.google.security.zynamics.binnavi.disassembly.MockFunction) ArrayList(java.util.ArrayList) CCrossReferencesModel(com.google.security.zynamics.binnavi.Gui.GraphWindows.BottomPanel.CrossReferences.CCrossReferencesModel) Test(org.junit.Test)

Example 19 with MockFunction

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

the class CCrossReferencesModelTest method test2GetColumnCount.

@Test
public void test2GetColumnCount() {
    final CCrossReferencesModel model = new CCrossReferencesModel();
    final CCrossReference reference = new CCrossReference(new MockFunction(), new MockFunction());
    final List<CCrossReference> crossReferences = new ArrayList<CCrossReference>();
    crossReferences.add(reference);
    model.setCrossReferences(crossReferences);
    assertEquals(2, model.getColumnCount());
}
Also used : CCrossReference(com.google.security.zynamics.binnavi.Gui.GraphWindows.BottomPanel.CrossReferences.CCrossReference) MockFunction(com.google.security.zynamics.binnavi.disassembly.MockFunction) ArrayList(java.util.ArrayList) CCrossReferencesModel(com.google.security.zynamics.binnavi.Gui.GraphWindows.BottomPanel.CrossReferences.CCrossReferencesModel) Test(org.junit.Test)

Example 20 with MockFunction

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

the class CUnInlinerTest method testOneBlock.

@Test
public void testOneBlock() {
    final List<INaviViewNode> nodes = new FilledList<INaviViewNode>();
    final List<INaviEdge> edges = new FilledList<INaviEdge>();
    final INaviFunction mockFunction = new MockFunction();
    final CCodeNode node = new CCodeNode(0, 0, 0, 0, 0, Color.RED, Color.RED, false, true, null, mockFunction, new HashSet<CTag>(), m_provider);
    nodes.add(node);
    final MockView view = new MockView(nodes, edges, m_provider);
    CUnInliner.unInline(view, node);
}
Also used : MockFunction(com.google.security.zynamics.binnavi.disassembly.MockFunction) FilledList(com.google.security.zynamics.zylib.types.lists.FilledList) MockView(com.google.security.zynamics.binnavi.disassembly.MockView) CCodeNode(com.google.security.zynamics.binnavi.disassembly.CCodeNode) CTag(com.google.security.zynamics.binnavi.Tagging.CTag) INaviViewNode(com.google.security.zynamics.binnavi.disassembly.INaviViewNode) INaviEdge(com.google.security.zynamics.binnavi.disassembly.INaviEdge) INaviFunction(com.google.security.zynamics.binnavi.disassembly.INaviFunction) Test(org.junit.Test)

Aggregations

MockFunction (com.google.security.zynamics.binnavi.disassembly.MockFunction)25 Test (org.junit.Test)23 CCodeNode (com.google.security.zynamics.binnavi.disassembly.CCodeNode)12 MockSqlProvider (com.google.security.zynamics.binnavi.Database.MockClasses.MockSqlProvider)8 INaviFunction (com.google.security.zynamics.binnavi.disassembly.INaviFunction)8 MockModule (com.google.security.zynamics.binnavi.disassembly.Modules.MockModule)8 CCrossReference (com.google.security.zynamics.binnavi.Gui.GraphWindows.BottomPanel.CrossReferences.CCrossReference)7 FilledList (com.google.security.zynamics.zylib.types.lists.FilledList)7 CTag (com.google.security.zynamics.binnavi.Tagging.CTag)6 INaviViewNode (com.google.security.zynamics.binnavi.disassembly.INaviViewNode)6 MockInstruction (com.google.security.zynamics.binnavi.disassembly.MockInstruction)6 CAddress (com.google.security.zynamics.zylib.disassembly.CAddress)6 MockCodeNodeData (com.google.security.zynamics.binnavi.Database.MockClasses.MockCodeNodeData)5 MockCodeNodeProvider (com.google.security.zynamics.binnavi.Database.MockClasses.MockCodeNodeProvider)5 CCodeNodeParser (com.google.security.zynamics.binnavi.Database.NodeParser.CCodeNodeParser)5 CCrossReferencesModel (com.google.security.zynamics.binnavi.Gui.GraphWindows.BottomPanel.CrossReferences.CCrossReferencesModel)5 CNaviViewEdge (com.google.security.zynamics.binnavi.disassembly.CNaviViewEdge)5 INaviEdge (com.google.security.zynamics.binnavi.disassembly.INaviEdge)5 MockView (com.google.security.zynamics.binnavi.disassembly.MockView)5 INaviCodeNode (com.google.security.zynamics.binnavi.disassembly.INaviCodeNode)4