use of org.eclipse.core.internal.expressions.SystemTestExpression in project eclipse.platform.runtime by eclipse.
the class ExpressionTests method testSystemTestExpressionHashCode.
public void testSystemTestExpressionHashCode() throws Exception {
SystemTestExpression expression1 = new SystemTestExpression("prop", "value");
SystemTestExpression expression2 = new SystemTestExpression("prop", "value");
assertEquals("Equal expressions should have the same hash code", expression1.hashCode(), expression2.hashCode());
}
use of org.eclipse.core.internal.expressions.SystemTestExpression in project eclipse.platform.runtime by eclipse.
the class ExpressionTests method testSystemProperty.
public void testSystemProperty() throws Exception {
// $NON-NLS-1$ //$NON-NLS-2$
SystemTestExpression expression = new SystemTestExpression("os.name", System.getProperty("os.name"));
EvaluationResult result = expression.evaluate(new EvaluationContext(null, new Object()));
assertTrue(result == EvaluationResult.TRUE);
}
use of org.eclipse.core.internal.expressions.SystemTestExpression in project eclipse.platform.runtime by eclipse.
the class ExpressionTests method testSystemTestExpressionNotEqual.
public void testSystemTestExpressionNotEqual() throws Exception {
SystemTestExpression expression1 = new SystemTestExpression("prop", "value1");
SystemTestExpression expression2 = new SystemTestExpression("prop", "value2");
assertTrue("These system test expressions should not be equal", !expression1.equals(expression2));
}
Aggregations