Return-Path: Delivered-To: apmail-httpd-test-dev-archive@www.apache.org Received: (qmail 21541 invoked from network); 8 Jun 2004 13:22:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 8 Jun 2004 13:22:45 -0000 Received: (qmail 52950 invoked by uid 500); 8 Jun 2004 13:22:46 -0000 Delivered-To: apmail-httpd-test-dev-archive@httpd.apache.org Received: (qmail 52827 invoked by uid 500); 8 Jun 2004 13:22:45 -0000 Mailing-List: contact test-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: test-dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list test-dev@httpd.apache.org Received: (qmail 52812 invoked by uid 99); 8 Jun 2004 13:22:45 -0000 Received: from [195.154.174.52] (HELO mail.logilune.com) (195.154.174.52) by apache.org (qpsmtpd/0.27.1) with ESMTP; Tue, 08 Jun 2004 06:22:45 -0700 Received: from stason.org (localhost.logilune.com [127.0.0.1]) by mail.logilune.com (Postfix) with ESMTP id A1E791E1C57 for ; Tue, 8 Jun 2004 15:22:31 +0200 (CEST) Message-ID: <40C5BDA2.5030807@stason.org> Date: Tue, 08 Jun 2004 06:22:42 -0700 From: Stas Bekman Organization: Hope, Humanized User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040115 X-Accept-Language: en-us, en, he, ru MIME-Version: 1.0 To: test-dev@httpd.apache.org Subject: Re: switching t_cmp() argument order References: <200406072056.i57Kurx5024931@moya.tamu.edu> <40C50F27.7020804@modperlcookbook.org> In-Reply-To: <40C50F27.7020804@modperlcookbook.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Geoffrey Young wrote: > I'm finding the difference between our t_cmp() and Test::More's is() really > annoying. that is, whereby t_cmp is > > t_cmp($expected, $received, $comment); > > is() (and isnt(), and is_deeply(), and maybe others) is > > is($received, $expected, $comment); > > so when using both I am constantly getting the order mixed up for one or the > other. > > as Test::More has been around longer and is much more popular than we are, > before it gets too late I would like to change t_cmp() to > > t_cmp($received, $expected, $comment); > > so that test writers can feel at home in either environment. > > for the most part the change would be transparent to users as long as their > tests pass. the only exception is qr// tests, which would error out now and > force a recode. there's not much we can do about that except to make the > switch sooner rather than later I guess. +1 >>jgsmith@moya:~ % perl -e '$a = qr/this/; print ref $a;' && echo >>Regexp >> >>Perhaps do a test and swap the arguments if the first is a Regexp, as >>well as issue a deprecation warning. > > > yeah, I thought about that. it's probably a good idea - I'd like to keep > code working while making things "right" with t_cmp(). +1 but we should take the checking out some time later (let's say a deprecation cycle of 4-5 releases?) to avoid clutter? -- __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:stas@stason.org http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com