You are viewing a plain text version of this content. The canonical link for it is here.
Posted to test-dev@httpd.apache.org by Geoffrey Young <ge...@modperlcookbook.org> on 2004/06/07 18:16:57 UTC

switching t_cmp() argument order

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