use of org.eclipse.core.internal.expressions.AndExpression in project eclipse.platform.runtime by eclipse.
the class ExpressionTests method testAndExpressionHashCode.
public void testAndExpressionHashCode() throws Exception {
AndExpression expression1 = new AndExpression();
expression1.add(new InstanceofExpression(// $NON-NLS-1$
"org.eclipse.core.internal.expressions.tests.Adapter"));
AndExpression expression2 = new AndExpression();
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.AndExpression in project eclipse.platform.runtime by eclipse.
the class ExpressionTests method testAndExpressionNotEqual.
public void testAndExpressionNotEqual() throws Exception {
AndExpression expression1 = new AndExpression();
expression1.add(new InstanceofExpression(// $NON-NLS-1$
"org.eclipse.core.internal.expressions.tests.Adapter1"));
AndExpression expression2 = new AndExpression();
expression2.add(new InstanceofExpression(// $NON-NLS-1$
"org.eclipse.core.internal.expressions.tests.Adapter2"));
assertTrue("These and expressions should not be equal", !expression1.equals(expression2));
}
use of org.eclipse.core.internal.expressions.AndExpression in project eclipse.platform.runtime by eclipse.
the class ExpressionInfoTests method testAndExpression.
public void testAndExpression() throws Exception {
AndExpression and = new AndExpression();
assertNoAccess(and.computeExpressionInfo());
and.add(new CountExpression("10"));
assertDefaultAccessOnly(and.computeExpressionInfo());
}
Aggregations