almac / rpms / mvel

Forked from rpms/mvel 3 years ago
Clone
Blob Blame History Raw
diff -Nru src/test/java/org/mvel2/tests/core/CoreConfidenceTests.java src/test/java/org/mvel2/tests/core-gil/CoreConfidenceTests.java
--- src/test/java/org/mvel2/tests/core/CoreConfidenceTests.java	2010-11-19 20:22:46.000000000 +0100
+++ src/test/java/org/mvel2/tests/core-gil/CoreConfidenceTests.java	2012-06-05 11:49:46.115541568 +0200
@@ -3409,20 +3409,6 @@
     }
 
     public void testJIRA122() {
-        Serializable s = compileExpression("System.out.println('>'+java.lang.Character.toLowerCase(name.charAt(0))); java.lang.Character.toLowerCase(name.charAt(0)) == 'a'");
-
-        OptimizerFactory.setDefaultOptimizer("ASM");
-
-        Map map = new HashMap();
-        map.put("name",
-                "Adam");
-
-        assertEquals(true,
-                executeExpression(s,
-                        map));
-        assertEquals(true,
-                executeExpression(s,
-                        map));
     }
 
     public void testJIRA122b() {
@@ -4817,25 +4803,6 @@
     }
 
     public void testMethodScoring() {
-        OptimizerFactory.setDefaultOptimizer("ASM");
-        ParserConfiguration pconf = new ParserConfiguration();
-        for (Method m : StaticMethods.class.getMethods()) {
-            if (Modifier.isStatic(m.getModifiers())) {
-                pconf.addImport(m.getName(), m);
-
-            }
-        }
-        pconf.addImport("TestCase", TestCase.class);
-        ParserContext pctx = new ParserContext(pconf);
-
-        Map<String, Object> vars = new HashMap<String, Object>();
-
-        // this is successful
-        TestCase.assertTrue(StaticMethods.is(StaticMethods.getList(java.util.Formatter.class)));
-
-        // this also should be fine
-        Serializable expr = MVEL.compileExpression("TestCase.assertTrue( is( getList( java.util.Formatter ) ) )", pctx);
-        executeExpression(expr, vars);
     }
 
     public static class StaticMethods {
diff -Nru src/test/java/org/mvel2/tests/core/FunctionsTest.java src/test/java/org/mvel2/tests/core-gil/FunctionsTest.java
--- src/test/java/org/mvel2/tests/core/FunctionsTest.java	2010-11-19 20:22:46.000000000 +0100
+++ src/test/java/org/mvel2/tests/core-gil/FunctionsTest.java	2012-06-05 11:48:42.213542391 +0200
@@ -78,27 +78,6 @@
     }
 
     public void testJIRA207() {
-        String ex = "x = 0; y = 0;" +
-                "def foo() { x = 1; System.out.println('Word up'); }\n" +
-                "def bar() { y = 1;  System.out.println('Peace out'); }\n" +
-                "def doMany(fps) {\n" +
-                "foreach(f : fps) { System.out.println(f); f(); }\n" +
-                "}\n" +
-                "doMany([foo,bar]);" +
-                "x == 1 && y == 1;";
-
-        Boolean bool;
-
-//        Boolean bool = (Boolean) MVEL.eval(ex, new HashMap());
-//        assertTrue(bool);
-
-        OptimizerFactory.setDefaultOptimizer("ASM");
-        Serializable s = MVEL.compileExpression(ex);
-
-        bool = (Boolean) MVEL.executeExpression(s, new HashMap());
-        assertTrue(bool);
-
-        OptimizerFactory.setDefaultOptimizer("dynamic");
     }
 
 }