[jboss-cvs] JBossAS SVN: r62325 - projects/test/trunk/test/src/main/org/jboss/test.

Adrian abrock at redhat.com
Fri Apr 13 08:26:48 EDT 2007


This is not correct. It does not compile.

The signature of the constructor is:

	 public TestSuite(final Class<? extends TestCase> theClass) {

so the parameter to the method must be the same.

Class<?> instanceof Class<? extends TestCase> == false

On Fri, 2007-04-13 at 08:12 -0400, jboss-cvs-commits at lists.jboss.org
wrote:
> Author: alesj
> Date: 2007-04-13 08:12:42 -0400 (Fri, 13 Apr 2007)
> New Revision: 62325
> 
> Modified:
>    projects/test/trunk/test/src/main/org/jboss/test/BaseTestCase.java
> Log:
> get suite util method - for TestCase classes
> 
> Modified: projects/test/trunk/test/src/main/org/jboss/test/BaseTestCase.java
> ===================================================================
> --- projects/test/trunk/test/src/main/org/jboss/test/BaseTestCase.java	2007-04-13 12:06:35 UTC (rev 62324)
> +++ projects/test/trunk/test/src/main/org/jboss/test/BaseTestCase.java	2007-04-13 12:12:42 UTC (rev 62325)
> @@ -21,9 +21,10 @@
>  */
>  package org.jboss.test;
>  
> +import junit.framework.TestSuite;
> +import junit.framework.TestCase;
>  import org.jboss.logging.Logger;
>  import org.jboss.test.logging.LoggingPlugin;
> -import junit.framework.TestSuite;
>  
>  /**
>   * Base Test Case. Simple test support.
> @@ -55,7 +56,7 @@
>      * @param clazz the class
>      * @return the suite
>      */
> -   public static TestSuite suite(Class<?> clazz)
> +   public static TestSuite suite(Class<? extnds TestCase> clazz)
>     {
>        return new TestSuite(clazz);
>     }
> 
> _______________________________________________
> jboss-cvs-commits mailing list
> jboss-cvs-commits at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jboss-cvs-commits
-- 
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Adrian Brock
Chief Scientist
JBoss, a division of Red Hat
xxxxxxxxxxxxxxxxxxxxxxxxxxxx




More information about the jboss-cvs-commits mailing list