commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: svn commit: r983219 - /commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/StringUtilsTest.java
Date Mon, 09 Aug 2010 03:39:59 GMT
On 9 August 2010 04:08, James Carman <james@carmanconsulting.com> wrote:
> On Sun, Aug 8, 2010 at 10:51 PM, sebb <sebbaz@gmail.com> wrote:
>>
>> Although the compiler changes varargs into String[] arrays, the two
>> tests are not equivalent.
>>
>> Using varargs exclusively can hide bugs.
>>
>> For example, method(String, String[]) is not the same as method(String ...).
>>
>
> We're talking about specifically the code I checked in.  I believe I'm
> exercising the implementation of the methods exactly the same as it
> was before.  It's just being called differently (using varargs).

IMO the tests are now less stringent, e.g. they no longer distinguish
leading string parameters from varargs when calling
StringUtils.startsWithAny.

As I wrote before, by all means add new vararg tests, but dropping
existing tests does not make sense to me.

> ---------------------------------------------------------------------
> 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


Mime
View raw message