use of org.eclipse.core.internal.expressions.ResolveExpression in project eclipse.platform.runtime by eclipse.
the class ExpressionTests method testResolveExpressionNotEqual.
public void testResolveExpressionNotEqual() throws Exception {
ResolveExpression expression1 = new ResolveExpression("variable1", new Object[0]);
expression1.add(new InstanceofExpression(// $NON-NLS-1$
"org.eclipse.core.internal.expressions.tests.Adapter1"));
ResolveExpression expression2 = new ResolveExpression("variable2", new Object[0]);
expression2.add(new InstanceofExpression(// $NON-NLS-1$
"org.eclipse.core.internal.expressions.tests.Adapter2"));
assertTrue("These resolve expressions should not be equal", !expression1.equals(expression2));
}
use of org.eclipse.core.internal.expressions.ResolveExpression in project eclipse.platform.runtime by eclipse.
the class ExpressionTests method testResolveExpressionHashCode.
public void testResolveExpressionHashCode() throws Exception {
ResolveExpression expression1 = new ResolveExpression("variable", new Object[0]);
expression1.add(new InstanceofExpression(// $NON-NLS-1$
"org.eclipse.core.internal.expressions.tests.Adapter"));
ResolveExpression expression2 = new ResolveExpression("variable", new Object[0]);
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.ResolveExpression in project eclipse.platform.runtime by eclipse.
the class ExpressionInfoTests method testResolveExpression.
public void testResolveExpression() {
ResolveExpression resolve = new ResolveExpression("variable", null);
assertNoAccess(resolve.computeExpressionInfo());
resolve.add(new CountExpression("10"));
assertVariableAccess(resolve.computeExpressionInfo(), "variable");
}
Aggregations