summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorahaase2008-02-02 11:20:04 (EST)
committerahaase2008-02-02 11:20:04 (EST)
commit6bc62cdfb8cfac3df647d78bc4b30b2c5753a515 (patch)
tree2a35abfcdae40a16e55c4f39114976edbf55b1ff
parent2b687fb830e95665139e6a87f22ae0c5f334b6d5 (diff)
downloadorg.eclipse.xpand-6bc62cdfb8cfac3df647d78bc4b30b2c5753a515.zip
org.eclipse.xpand-6bc62cdfb8cfac3df647d78bc4b30b2c5753a515.tar.gz
org.eclipse.xpand-6bc62cdfb8cfac3df647d78bc4b30b2c5753a515.tar.bz2
refactored
-rw-r--r--plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/expression/ast/EvaluationTest.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/expression/ast/EvaluationTest.java b/plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/expression/ast/EvaluationTest.java
index 43cce5a..b310f5f 100644
--- a/plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/expression/ast/EvaluationTest.java
+++ b/plugins/org.eclipse.xtend.tests/src/org/eclipse/xtend/expression/ast/EvaluationTest.java
@@ -44,6 +44,10 @@ public class EvaluationTest extends TestCase {
ec.registerMetaModel(new JavaMetaModel("asdf", new JavaBeansStrategy()));
}
+ private Expression parse (final String expression) {
+ return ParseFacade.expression(expression);
+ }
+
private Object eval (String expression) {
final Expression expr = ParseFacade.expression(expression);
return expr.evaluate (ec);
@@ -54,6 +58,10 @@ public class EvaluationTest extends TestCase {
return eval (expression);
}
+ private Object eval (Expression expr) {
+ return expr.evaluate (ec);
+ }
+
public final void testSimple() {
final Object result = eval ("true == null");
assertFalse(((Boolean) result).booleanValue());
@@ -124,7 +132,7 @@ public class EvaluationTest extends TestCase {
}
public final void testTypeLiteral1() {
- assertEquals(ec.getStringType(), eval ("String"));
+ assertEquals(ec.getStringType(), eval (parse("String")));
assertTrue (eval ("String.getProperty('length')") instanceof Property);