use of com.google.security.zynamics.binnavi.Gui.CriteriaDialog.Conditions.Not.CCachedNotCriterium in project binnavi by google.
the class CCriteriumExecuterTest method testInvalidNotCriterion.
@Test(expected = IllegalStateException.class)
public void testInvalidNotCriterion() {
final CCachedNotCriterium criterium = new CCachedNotCriterium();
final CCachedExpressionTreeNode node = new CCachedExpressionTreeNode(criterium);
CCachedExpressionTreeNode.append(m_tree.getRoot(), node);
final CCachedTextCriterium criterium2 = new CCachedTextCriterium("nop", false, false);
final CCachedExpressionTreeNode node2 = new CCachedExpressionTreeNode(criterium2);
CCachedExpressionTreeNode.append(node, node2);
final CCachedColorCriterium criterium3 = new CCachedColorCriterium(Color.BLUE);
final CCachedExpressionTreeNode node3 = new CCachedExpressionTreeNode(criterium3);
CCachedExpressionTreeNode.append(node, node3);
CCriteriumExecuter.execute(m_tree, m_graph);
}
use of com.google.security.zynamics.binnavi.Gui.CriteriaDialog.Conditions.Not.CCachedNotCriterium in project binnavi by google.
the class CCriteriumExecuterTest method testMatchingNotCriterion.
/**
* This test makes sure that NOT criteria are correctly evaluated (TRUE case).
*/
@Test
public void testMatchingNotCriterion() {
final CCachedNotCriterium criterium = new CCachedNotCriterium();
final CCachedExpressionTreeNode node = new CCachedExpressionTreeNode(criterium);
CCachedExpressionTreeNode.append(m_tree.getRoot(), node);
final CCachedColorCriterium criterium3 = new CCachedColorCriterium(Color.RED);
final CCachedExpressionTreeNode node3 = new CCachedExpressionTreeNode(criterium3);
CCachedExpressionTreeNode.append(node, node3);
assertEquals(0, m_graph.getSelectedNodes().size());
CCriteriumExecuter.execute(m_tree, m_graph);
assertEquals(2, m_graph.getSelectedNodes().size());
}
use of com.google.security.zynamics.binnavi.Gui.CriteriaDialog.Conditions.Not.CCachedNotCriterium in project binnavi by google.
the class CCriteriumExecuterTest method testValidNotCriterion.
/**
* This test makes sure that NOT criteria are correctly evaluated (FALSE case).
*/
@Test
public void testValidNotCriterion() {
final CCachedNotCriterium criterium = new CCachedNotCriterium();
final CCachedExpressionTreeNode node = new CCachedExpressionTreeNode(criterium);
CCachedExpressionTreeNode.append(m_tree.getRoot(), node);
final CCachedTextCriterium criterium2 = new CCachedTextCriterium("nop", false, false);
final CCachedExpressionTreeNode node2 = new CCachedExpressionTreeNode(criterium2);
CCachedExpressionTreeNode.append(node, node2);
assertEquals(0, m_graph.getSelectedNodes().size());
CCriteriumExecuter.execute(m_tree, m_graph);
assertEquals(2, m_graph.getSelectedNodes().size());
}
Aggregations