httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoffrey Young <ge...@modperlcookbook.org>
Subject switching t_cmp() argument order
Date Mon, 07 Jun 2004 16:16:57 GMT
hi all

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.

--Geoff

Mime
View raw message