commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r1559140 - /commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/groovy/GroovyEvaluatorTest.java
Date Fri, 17 Jan 2014 15:19:54 GMT
Author: ate
Date: Fri Jan 17 15:19:54 2014
New Revision: 1559140

URL: http://svn.apache.org/r1559140
Log:
SCXML-186: Groovy Expression evaluator support
- adding test for the GroovyEvaluator ScriptPreProcessor

Modified:
    commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/groovy/GroovyEvaluatorTest.java

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/groovy/GroovyEvaluatorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/groovy/GroovyEvaluatorTest.java?rev=1559140&r1=1559139&r2=1559140&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/groovy/GroovyEvaluatorTest.java
(original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/groovy/GroovyEvaluatorTest.java
Fri Jan 17 15:19:54 2014
@@ -92,4 +92,12 @@ public class GroovyEvaluatorTest {
         }
     }
 
+    @Test
+    public void testPreprocessScript() {
+        GroovyEvaluator evaluator = new GroovyEvaluator();
+        Assert.assertEquals("x &&  x || x  !  x == x <  x <= x != x >  x
>= x", evaluator.getScriptPreProcessor().
+                preProcess("x and x or x not x eq x lt x le x ne x gt x ge x"));
+        Assert.assertEquals("and x OR x\n ! \nx\n== x < \nx(le)x ne. xgt x ge", evaluator.getScriptPreProcessor().
+                 preProcess("and x OR x\nnot\nx\neq x lt\nx(le)x ne. xgt x ge"));
+    }
 }



Mime
View raw message