Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:47203 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 24066 invoked from network); 13 Mar 2010 00:52:43 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Mar 2010 00:52:43 -0000 Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.42 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 74.125.82.42 mail-ww0-f42.google.com Received: from [74.125.82.42] ([74.125.82.42:36985] helo=mail-ww0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B6/4D-13686-8D1EA9B4 for ; Fri, 12 Mar 2010 19:52:41 -0500 Received: by wwc33 with SMTP id 33so1249790wwc.29 for ; Fri, 12 Mar 2010 16:52:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=NnV4DLvmnuNB47Uf+K9k/gtEWNymnizUPCcR1bG83lE=; b=LSejEh9/yyUTwbO1Iqhdys1vFcDCnwbiJBqwKZyrtC3fD2r9xlS03qn45qVnQLSUmh Ee3yduRuN+GC8U4Yn3AAI6UJmnEmez2SomVN69NOQZxiX5rxXqPuB6bPlyLdBWCzYqy8 +/Sk0sYRCvBAbFY2VVsddT69rpEiqZsr690AQ= 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 :cc:content-type; b=nRnVthFTtVbuP1lnqgFMLdNW7/iBGUjSDxob10HMucuAYdMhzb9iIWfoOp9DIULKMJ z22gA4pYmlmzr4EP54/X1Y8KB7AUYct5/NnuZEK99ttnPW4LwS328uhdyE4Lk63ZLiGR DpQ04P/J6fytm0UNHXs0IiwrpOsuNL0HPtO/A= MIME-Version: 1.0 Received: by 10.216.85.203 with SMTP id u53mr244963wee.184.1268441557887; Fri, 12 Mar 2010 16:52:37 -0800 (PST) In-Reply-To: <4B9ACDF8.2020300@zend.com> References: <4B9926E8.4080202@lerdorf.com> <1418253B-84A3-4CA6-965B-A2501A5D432F@gmail.com> <4B9AB840.1010209@zend.com> <4B9ABDCE.2070904@zend.com> <4B9AC13B.401@sci.fi> <4B9ACDF8.2020300@zend.com> Date: Sat, 13 Mar 2010 01:52:37 +0100 Message-ID: To: Stanislav Malyshev Cc: internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] Tests repository From: pierre.php@gmail.com (Pierre Joye) On Sat, Mar 13, 2010 at 12:27 AM, Stanislav Malyshev wrote: > Hi! > >> It is always possible to write a test for both versions (except >> namespace). However it requires a radical change on how we test >> things. >> Instead of testing the output of given script, we will have to add >> logics in a test, something similar to the classic xUnit frameworks. >> For example, we will have to do the error msg check inside the test > > It is possible, but that means instead of 2 trees of files you'd have these > trees distributed inside test files in a myriad of small if()s: > if(version == X) { test this error message } > elseif(version == Y) { test that error message } > else { test that another error message } > > and the same for different pieces of function, etc. Why is it better? I'm not saying it is better to write test, but it is better to maintain one set of tests for all branches and keep them uptodate. But that's definitivelly more work, and not only for the 1st shot. That's why I would rather triple check if we really want to go down this way. Cheers, -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org