Author: bodewig Date: Thu Apr 6 12:44:24 2006 New Revision: 392052 URL: http://svn.apache.org/viewcvs?rev=392052&view=rev Log: a test for the suite() method, passes if JUnit4 is not around
Added: ant/core/trunk/src/testcases/org/apache/tools/ant/taskdefs/optional/junit/SuiteMethodTest.java (with props) Added: ant/core/trunk/src/testcases/org/apache/tools/ant/taskdefs/optional/junit/SuiteMethodTest.java URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/testcases/org/apache/tools/ant/taskdefs/optional/junit/SuiteMethodTest.java?rev=392052&view=auto ============================================================================== --- ant/core/trunk/src/testcases/org/apache/tools/ant/taskdefs/optional/junit/SuiteMethodTest.java (added) +++ ant/core/trunk/src/testcases/org/apache/tools/ant/taskdefs/optional/junit/SuiteMethodTest.java Thu Apr 6 12:44:24 2006 @@ -0,0 +1,41 @@ +/* + * Copyright 2006 The Apache Software Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package org.apache.tools.ant.taskdefs.optional.junit; + +import junit.framework.Test; +import junit.framework.TestCase; + +/** + * validates that the suite() method works in classes that don't + * implement Test. + */ +public class SuiteMethodTest { + + public static Test suite() { + return new Nested("testMethod"); + } + + public static class Nested extends TestCase { + public Nested(String name) { + super(name); + } + + public void testMethod() { + assertTrue(true); + } + } +} \ No newline at end of file Propchange: ant/core/trunk/src/testcases/org/apache/tools/ant/taskdefs/optional/junit/SuiteMethodTest.java ------------------------------------------------------------------------------ svn:eol-style = native --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]