Search in sources :

Example 1 with CCachedVisibilityCriterium

use of com.google.security.zynamics.binnavi.Gui.CriteriaDialog.Conditions.Visibillity.CCachedVisibilityCriterium in project binnavi by google.

the class CCriteriumExecuterTest method testSingleVisibilityCriterionUnvisible.

@Test
public void testSingleVisibilityCriterionUnvisible() {
    final CCachedVisibilityCriterium criterium = new CCachedVisibilityCriterium(VisibilityState.UNVISIBLE);
    final CCachedExpressionTreeNode node = new CCachedExpressionTreeNode(criterium);
    CCachedExpressionTreeNode.append(m_tree.getRoot(), node);
    assertEquals(0, m_graph.getSelectedNodes().size());
    CCriteriumExecuter.execute(m_tree, m_graph);
    assertEquals(1, m_graph.getSelectedNodes().size());
}
Also used : CCachedVisibilityCriterium(com.google.security.zynamics.binnavi.Gui.CriteriaDialog.Conditions.Visibillity.CCachedVisibilityCriterium) CCachedExpressionTreeNode(com.google.security.zynamics.binnavi.Gui.CriteriaDialog.ExpressionModel.CCachedExpressionTreeNode) Test(org.junit.Test)

Example 2 with CCachedVisibilityCriterium

use of com.google.security.zynamics.binnavi.Gui.CriteriaDialog.Conditions.Visibillity.CCachedVisibilityCriterium in project binnavi by google.

the class CCriteriumExecuterTest method testSingleVisibilityCriterionVisible.

@Test
public void testSingleVisibilityCriterionVisible() {
    final CCachedVisibilityCriterium criterium = new CCachedVisibilityCriterium(VisibilityState.VISIBLE);
    final CCachedExpressionTreeNode node = new CCachedExpressionTreeNode(criterium);
    CCachedExpressionTreeNode.append(m_tree.getRoot(), node);
    assertEquals(0, m_graph.getSelectedNodes().size());
    CCriteriumExecuter.execute(m_tree, m_graph);
    assertEquals(m_graph.getNodes().size() - 1, m_graph.getSelectedNodes().size());
}
Also used : CCachedVisibilityCriterium(com.google.security.zynamics.binnavi.Gui.CriteriaDialog.Conditions.Visibillity.CCachedVisibilityCriterium) CCachedExpressionTreeNode(com.google.security.zynamics.binnavi.Gui.CriteriaDialog.ExpressionModel.CCachedExpressionTreeNode) Test(org.junit.Test)

Aggregations

CCachedVisibilityCriterium (com.google.security.zynamics.binnavi.Gui.CriteriaDialog.Conditions.Visibillity.CCachedVisibilityCriterium)2 CCachedExpressionTreeNode (com.google.security.zynamics.binnavi.Gui.CriteriaDialog.ExpressionModel.CCachedExpressionTreeNode)2 Test (org.junit.Test)2