You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by sebb <se...@gmail.com> on 2010/01/22 15:21:39 UTC

[MATH] Remove unnecessary suite() methods from test classes?

There are a lot of src/test classes that contain a suite() method of the form:

    public static Test suite() {
        TestSuite suite = new TestSuite(SparseRealVectorTest.class);
        suite.setName("SparseRealVector Tests");
        return suite;
    }

or

    public static Test suite() {
        return new TestSuite(TriDiagonalTransformerTest.class);
    }


Seems to me that these methods add little or no benefit to the code,
and could just be removed.

Any objections?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [MATH] Remove unnecessary suite() methods from test classes?

Posted by Phil Steitz <ph...@gmail.com>.
sebb wrote:
> On 23/01/2010, Bill Barker <bi...@verizon.net> wrote:
>>
>>  --------------------------------------------------
>>  From: "sebb" <se...@gmail.com>
>>  Sent: Friday, January 22, 2010 6:21 AM
>>  To: "Commons Developers List" <de...@commons.apache.org>
>>  Subject: [MATH] Remove unnecessary suite() methods from test classes?
>>
>>
>>
>>> There are a lot of src/test classes that contain a suite() method of the
>> form:
>>>   public static Test suite() {
>>>       TestSuite suite = new
>> TestSuite(SparseRealVectorTest.class);
>>>       suite.setName("SparseRealVector Tests");
>>>       return suite;
>>>   }
>>>
>>> or
>>>
>>>   public static Test suite() {
>>>       return new
>> TestSuite(TriDiagonalTransformerTest.class);
>>>   }
>>>
>>>
>>> Seems to me that these methods add little or no benefit to the code,
>>> and could just be removed.
>>>
>>> Any objections?
>>>
>>>
>>  +1
>>
> 
> And the result is:
> 
> -suite()
> 
> (they have all gone)

Thanks!

Phil
> 
>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail:
>> dev-unsubscribe@commons.apache.org
>>> For additional commands, e-mail: dev-help@commons.apache.org
>>>
>>>
>> ---------------------------------------------------------------------
>>  To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>>  For additional commands, e-mail: dev-help@commons.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [MATH] Remove unnecessary suite() methods from test classes?

Posted by sebb <se...@gmail.com>.
On 23/01/2010, Bill Barker <bi...@verizon.net> wrote:
>
>
>  --------------------------------------------------
>  From: "sebb" <se...@gmail.com>
>  Sent: Friday, January 22, 2010 6:21 AM
>  To: "Commons Developers List" <de...@commons.apache.org>
>  Subject: [MATH] Remove unnecessary suite() methods from test classes?
>
>
>
> > There are a lot of src/test classes that contain a suite() method of the
> form:
> >
> >   public static Test suite() {
> >       TestSuite suite = new
> TestSuite(SparseRealVectorTest.class);
> >       suite.setName("SparseRealVector Tests");
> >       return suite;
> >   }
> >
> > or
> >
> >   public static Test suite() {
> >       return new
> TestSuite(TriDiagonalTransformerTest.class);
> >   }
> >
> >
> > Seems to me that these methods add little or no benefit to the code,
> > and could just be removed.
> >
> > Any objections?
> >
> >
>
>  +1
>

And the result is:

-suite()

(they have all gone)

>
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> dev-unsubscribe@commons.apache.org
> > For additional commands, e-mail: dev-help@commons.apache.org
> >
> >
>
> ---------------------------------------------------------------------
>  To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>  For additional commands, e-mail: dev-help@commons.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [MATH] Remove unnecessary suite() methods from test classes?

Posted by Bill Barker <bi...@verizon.net>.

--------------------------------------------------
From: "sebb" <se...@gmail.com>
Sent: Friday, January 22, 2010 6:21 AM
To: "Commons Developers List" <de...@commons.apache.org>
Subject: [MATH] Remove unnecessary suite() methods from test classes?

> There are a lot of src/test classes that contain a suite() method of the 
> form:
>
>    public static Test suite() {
>        TestSuite suite = new TestSuite(SparseRealVectorTest.class);
>        suite.setName("SparseRealVector Tests");
>        return suite;
>    }
>
> or
>
>    public static Test suite() {
>        return new TestSuite(TriDiagonalTransformerTest.class);
>    }
>
>
> Seems to me that these methods add little or no benefit to the code,
> and could just be removed.
>
> Any objections?
>

+1

> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [MATH] Remove unnecessary suite() methods from test classes?

Posted by Phil Steitz <ph...@gmail.com>.
sebb wrote:
> There are a lot of src/test classes that contain a suite() method of the form:
> 
>     public static Test suite() {
>         TestSuite suite = new TestSuite(SparseRealVectorTest.class);
>         suite.setName("SparseRealVector Tests");
>         return suite;
>     }
> 
> or
> 
>     public static Test suite() {
>         return new TestSuite(TriDiagonalTransformerTest.class);
>     }
> 
> 
> Seems to me that these methods add little or no benefit to the code,
> and could just be removed.
> 
> Any objections?

+1

Phil
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
> 
+



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [MATH] Remove unnecessary suite() methods from test classes?

Posted by Dimitri Pourbaix <po...@astro.ulb.ac.be>.
+1

Dim.

> There are a lot of src/test classes that contain a suite() method of
> the form:
>
>     public static Test suite() {
>         TestSuite suite = new TestSuite(SparseRealVectorTest.class);
>         suite.setName("SparseRealVector Tests");
>         return suite;
>     }
>
> or
>
>     public static Test suite() {
>         return new TestSuite(TriDiagonalTransformerTest.class);
>     }
>
>
> Seems to me that these methods add little or no benefit to the code,
> and could just be removed.
>
> Any objections?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
----------------------------------------------------------------------------
Dimitri Pourbaix                         *
Institut d'Astronomie et d'Astrophysique *      Don't worry, be happy
CP 226, office 2.N4.211, building NO     *         and CARPE DIEM.
Universite Libre de Bruxelles            *
Boulevard du Triomphe                    *      Tel : +32-2-650.35.71
  B-1050 Bruxelles                        *      Fax : +32-2-650.42.26
http://sb9.astro.ulb.ac.be/~pourbaix     * mailto:pourbaix@astro.ulb.ac.be

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [MATH] Remove unnecessary suite() methods from test classes?

Posted by lu...@free.fr.
+1

Luc
----- "sebb" <se...@gmail.com> a écrit :

> There are a lot of src/test classes that contain a suite() method of
> the form:
> 
>     public static Test suite() {
>         TestSuite suite = new TestSuite(SparseRealVectorTest.class);
>         suite.setName("SparseRealVector Tests");
>         return suite;
>     }
> 
> or
> 
>     public static Test suite() {
>         return new TestSuite(TriDiagonalTransformerTest.class);
>     }
> 
> 
> Seems to me that these methods add little or no benefit to the code,
> and could just be removed.
> 
> Any objections?
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org