Author: markt
Date: Sat Jul 13 19:33:30 2013
New Revision: 1502855
URL: http://svn.apache.org/r1502855
Log:
Prevent possible test failure depending on which method gets selected.
Modified:
tomcat/trunk/test/javax/el/TestELProcessor.java
Modified: tomcat/trunk/test/javax/el/TestELProcessor.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/test/javax/el/TestELProcessor.java?rev=1502855&r1=1502854&r2=1502855&view=diff
==============================================================================
--- tomcat/trunk/test/javax/el/TestELProcessor.java (original)
+++ tomcat/trunk/test/javax/el/TestELProcessor.java Sat Jul 13 19:33:30 2013
@@ -46,9 +46,10 @@ public class TestELProcessor {
@Test
public void testDefineFunctionMethod01() throws Exception {
ELProcessor elp = new ELProcessor();
- elp.defineFunction("fn", "toInt",
- Integer.class.getMethod("valueOf", String.class));
- Assert.assertEquals(Integer.valueOf(1), elp.eval("fn:toInt(1)"));
+ elp.defineFunction("fn", "toBoolean",
+ Boolean.class.getMethod("valueOf", String.class));
+ Assert.assertEquals(Boolean.valueOf(true),
+ elp.eval("fn:toBoolean(true)"));
}
@@ -57,7 +58,8 @@ public class TestELProcessor {
ELProcessor elp = new ELProcessor();
// java.lang should be automatically imported so no need for full class
// name
- elp.defineFunction("fn", "toInt", "Integer", "valueOf");
- Assert.assertEquals(Integer.valueOf(1), elp.eval("fn:toInt(1)"));
+ elp.defineFunction("fn", "toBoolean", "Boolean", "valueOf");
+ Assert.assertEquals(Boolean.valueOf(true),
+ elp.eval("fn:toBoolean(true)"));
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]