Return-Path: Delivered-To: apmail-commons-dev-archive@www.apache.org Received: (qmail 36229 invoked from network); 9 Aug 2010 11:40:13 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 9 Aug 2010 11:40:13 -0000 Received: (qmail 93734 invoked by uid 500); 9 Aug 2010 11:40:12 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 93331 invoked by uid 500); 9 Aug 2010 11:40:09 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 93322 invoked by uid 99); 9 Aug 2010 11:40:09 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Aug 2010 11:40:09 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of sebbaz@gmail.com designates 209.85.212.43 as permitted sender) Received: from [209.85.212.43] (HELO mail-vw0-f43.google.com) (209.85.212.43) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Aug 2010 11:40:02 +0000 Received: by vws8 with SMTP id 8so6283687vws.30 for ; Mon, 09 Aug 2010 04:39:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=myoJdiZIIE116JNPx7qTD4tqnQCQ6lEaNd4jbfGcl6g=; b=v+33Lj35wKAP3JEnYGFEEd89gxa68yvXuP0+yGkdo9v8Nhlfgt+vpGRH++kDcAG+kk x5WqKjjjSO3gCHj9R8Q6wixzHN9qisv2+X+urGwSFrn6lO9mchhbkWeCuymGDrLJXoJv ZNysgAaYpw0kZvVbsO0lW+OPrP2v5XfjQVCLY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=hXr+ZtJipyfmwDvCGhZyEYn7Oa/sRLk22kyM5mx/ILf58YAdlB6ECFhlvVzyefKqJC yN/bUGq0Tof2LfQeiUMOsFf5wTBAJPBRZt1BfkBgfNhfdKEKwyyvbzI1lunrpaMBAp/h lSSCd603V6oEV7cQ/cXBjnApJN3bnr6Cv6Cl4= MIME-Version: 1.0 Received: by 10.220.60.204 with SMTP id q12mr9471110vch.185.1281353981536; Mon, 09 Aug 2010 04:39:41 -0700 (PDT) Received: by 10.220.161.81 with HTTP; Mon, 9 Aug 2010 04:39:41 -0700 (PDT) In-Reply-To: References: <20100807120447.1745F2388A02@eris.apache.org> Date: Mon, 9 Aug 2010 12:39:41 +0100 Message-ID: Subject: Re: svn commit: r983219 - /commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/StringUtilsTest.java From: sebb To: Commons Developers List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On 9 August 2010 04:52, James Carman wrote: > On Sun, Aug 8, 2010 at 11:39 PM, sebb wrote: >> IMO the tests are now less stringent, e.g. they no longer distinguish >> leading string parameters from varargs when calling >> StringUtils.startsWithAny. >> > > And, neither would the user's code. =A0We're using the code exactly as > the user would be. =A0If we think this makes our API less-friendly, then > why are we making the change? > >> As I wrote before, by all means add new vararg tests, but dropping >> existing tests does not make sense to me. >> > > I guess we'll have to agree to disagree on this one. =A0I'm not going to > argue with you if you want to revert it. =A0I was just trying to do some > code clean-ups. =A0If we're moving to JDK5, then we should code like > we're using JDK5. =A0Our unit test code should reflect that. Yes, but the library is also supposed to be usable with user code that does not use the new features of JDK5. >=A0Remember, unit test code also serves as documentation to the user about= how the > API is supposed to be used. =A0It's sometimes the only "documentation" > that actually stays in synch with the code itself. =A0If we have > explicit String[] creation stuff in our test cases, folks might think > that's required (or wonder why we're not just using varargs when we > can). Exactly. If we don't have the String[] tests, then users may wonder if they have to change all their code in order to use the new version. We need to use both methods to show that both approaches are supported. > --------------------------------------------------------------------- > 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