Author: henrib Date: Sun Aug 30 13:07:30 2009 New Revision: 809328 URL: http://svn.apache.org/viewvc?rev=809328&view=rev Log: Removed suite() and main() methods from tests. Left one main() in JexlTestCase that can run any JEXL test from its arguments.
Modified: commons/proper/jexl/branches/2.0/src/test/java/org/apache/commons/jexl/BitwiseOperatorTest.java commons/proper/jexl/branches/2.0/src/test/java/org/apache/commons/jexl/CacheTest.java commons/proper/jexl/branches/2.0/src/test/java/org/apache/commons/jexl/JexlTest.java commons/proper/jexl/branches/2.0/src/test/java/org/apache/commons/jexl/JexlTestCase.java commons/proper/jexl/branches/2.0/src/test/java/org/apache/commons/jexl/junit/AsserterTest.java commons/proper/jexl/branches/2.0/src/test/java/org/apache/commons/jexl/parser/ParserTest.java Modified: commons/proper/jexl/branches/2.0/src/test/java/org/apache/commons/jexl/BitwiseOperatorTest.java URL: http://svn.apache.org/viewvc/commons/proper/jexl/branches/2.0/src/test/java/org/apache/commons/jexl/BitwiseOperatorTest.java?rev=809328&r1=809327&r2=809328&view=diff ============================================================================== --- commons/proper/jexl/branches/2.0/src/test/java/org/apache/commons/jexl/BitwiseOperatorTest.java (original) +++ commons/proper/jexl/branches/2.0/src/test/java/org/apache/commons/jexl/BitwiseOperatorTest.java Sun Aug 30 13:07:30 2009 @@ -147,7 +147,4 @@ asserter.assertExpression("~(120 | 42)", new Long( ~(120 | 42) )); } - public static void main(String[] args) throws Exception { - new BitwiseOperatorTest("debug").runTest("testAndVariableNumberCoercion"); - } } Modified: commons/proper/jexl/branches/2.0/src/test/java/org/apache/commons/jexl/CacheTest.java URL: http://svn.apache.org/viewvc/commons/proper/jexl/branches/2.0/src/test/java/org/apache/commons/jexl/CacheTest.java?rev=809328&r1=809327&r2=809328&view=diff ============================================================================== --- commons/proper/jexl/branches/2.0/src/test/java/org/apache/commons/jexl/CacheTest.java (original) +++ commons/proper/jexl/branches/2.0/src/test/java/org/apache/commons/jexl/CacheTest.java Sun Aug 30 13:07:30 2009 @@ -17,17 +17,11 @@ package org.apache.commons.jexl; import java.util.Map; -import junit.framework.Test; -import junit.framework.TestSuite; /** * Verifies cache & tryExecute */ public class CacheTest extends JexlTestCase { - public static Test suite() { - return new TestSuite(CacheTest.class); - } - public CacheTest(String testName) { super(testName); } Modified: commons/proper/jexl/branches/2.0/src/test/java/org/apache/commons/jexl/JexlTest.java URL: http://svn.apache.org/viewvc/commons/proper/jexl/branches/2.0/src/test/java/org/apache/commons/jexl/JexlTest.java?rev=809328&r1=809327&r2=809328&view=diff ============================================================================== --- commons/proper/jexl/branches/2.0/src/test/java/org/apache/commons/jexl/JexlTest.java (original) +++ commons/proper/jexl/branches/2.0/src/test/java/org/apache/commons/jexl/JexlTest.java Sun Aug 30 13:07:30 2009 @@ -30,9 +30,6 @@ import java.util.Map; import java.util.Set; -import junit.framework.Test; -import junit.framework.TestSuite; - import org.apache.commons.jexl.parser.ParseException; import org.apache.commons.jexl.parser.Parser; @@ -48,11 +45,6 @@ protected static final String METHOD_STRING = "Method string"; protected static final String GET_METHOD_STRING = "GetMethod string"; - public static Test suite() - { - return new TestSuite(JexlTest.class); - } - public JexlTest(String testName) { super(testName); @@ -831,8 +823,4 @@ assertEquals(expression, expected, actual); } - public static void main(String[] args) throws Exception { - new JexlTest("debug").runTest("testNew"); - } - } \ No newline at end of file Modified: commons/proper/jexl/branches/2.0/src/test/java/org/apache/commons/jexl/JexlTestCase.java URL: http://svn.apache.org/viewvc/commons/proper/jexl/branches/2.0/src/test/java/org/apache/commons/jexl/JexlTestCase.java?rev=809328&r1=809327&r2=809328&view=diff ============================================================================== --- commons/proper/jexl/branches/2.0/src/test/java/org/apache/commons/jexl/JexlTestCase.java (original) +++ commons/proper/jexl/branches/2.0/src/test/java/org/apache/commons/jexl/JexlTestCase.java Sun Aug 30 13:07:30 2009 @@ -234,4 +234,12 @@ test.runTest(mname); } + /** + * Runs a test. + * @param args where args[0] is the test class name and args[1] the test class method + * @throws Exception + */ + public static void main(String[] args) throws Exception { + runTest(args[0], args[1]); + } } Modified: commons/proper/jexl/branches/2.0/src/test/java/org/apache/commons/jexl/junit/AsserterTest.java URL: http://svn.apache.org/viewvc/commons/proper/jexl/branches/2.0/src/test/java/org/apache/commons/jexl/junit/AsserterTest.java?rev=809328&r1=809327&r2=809328&view=diff ============================================================================== --- commons/proper/jexl/branches/2.0/src/test/java/org/apache/commons/jexl/junit/AsserterTest.java (original) +++ commons/proper/jexl/branches/2.0/src/test/java/org/apache/commons/jexl/junit/AsserterTest.java Sun Aug 30 13:07:30 2009 @@ -17,9 +17,6 @@ package org.apache.commons.jexl.junit; import junit.framework.AssertionFailedError; -import junit.framework.Test; -import junit.framework.TestSuite; -import junit.textui.TestRunner; import org.apache.commons.jexl.JexlEngine; import org.apache.commons.jexl.JexlTestCase; @@ -33,15 +30,6 @@ * @version $Id$ */ public class AsserterTest extends JexlTestCase { - - public static Test suite() { - return new TestSuite(AsserterTest.class); - } - - public static void main(String[] args) { - TestRunner.run(suite()); - } - public AsserterTest(String testName) { super(testName); } Modified: commons/proper/jexl/branches/2.0/src/test/java/org/apache/commons/jexl/parser/ParserTest.java URL: http://svn.apache.org/viewvc/commons/proper/jexl/branches/2.0/src/test/java/org/apache/commons/jexl/parser/ParserTest.java?rev=809328&r1=809327&r2=809328&view=diff ============================================================================== --- commons/proper/jexl/branches/2.0/src/test/java/org/apache/commons/jexl/parser/ParserTest.java (original) +++ commons/proper/jexl/branches/2.0/src/test/java/org/apache/commons/jexl/parser/ParserTest.java Sun Aug 30 13:07:30 2009 @@ -18,9 +18,7 @@ import java.io.StringReader; -import junit.framework.Test; import junit.framework.TestCase; -import junit.framework.TestSuite; /** * @since 1.0 @@ -28,11 +26,6 @@ */ public class ParserTest extends TestCase { - public static Test suite() - { - return new TestSuite(ParserTest.class); - } - public ParserTest(String testName) { super(testName); @@ -61,13 +54,4 @@ sn = parser.parse(new StringReader("foo = 'bar';"), null); assertNotNull("parsed node is null", sn); } - - public static void main(String[] args) - throws Exception - { - ParserTest pt = new ParserTest("foo"); - - pt.testParse1(); - } - }