use of org.eclipse.core.internal.expressions.OrExpression in project eclipse.platform.runtime by eclipse.
the class ExpressionTests method testOrExpressionHashCode.
public void testOrExpressionHashCode() throws Exception {
OrExpression expression1 = new OrExpression();
expression1.add(new InstanceofExpression(// $NON-NLS-1$
"org.eclipse.core.internal.expressions.tests.Adapter"));
OrExpression expression2 = new OrExpression();
expression2.add(new InstanceofExpression(// $NON-NLS-1$
"org.eclipse.core.internal.expressions.tests.Adapter"));
assertEquals("Equal expressions should have the same hash code", expression1.hashCode(), expression2.hashCode());
}
use of org.eclipse.core.internal.expressions.OrExpression in project eclipse.platform.runtime by eclipse.
the class ExpressionTests method testOrExpressionNotEqual.
public void testOrExpressionNotEqual() throws Exception {
OrExpression expression1 = new OrExpression();
expression1.add(new InstanceofExpression(// $NON-NLS-1$
"org.eclipse.core.internal.expressions.tests.Adapter1"));
OrExpression expression2 = new OrExpression();
expression2.add(new InstanceofExpression(// $NON-NLS-1$
"org.eclipse.core.internal.expressions.tests.Adapter2"));
assertTrue("These or expressions should not be equal", !expression1.equals(expression2));
}
Aggregations