[tpm] Riddle me this ...

Liam R E Quin liam at holoweb.net
Thu Dec 27 19:06:10 PST 2012


On Thu, 2012-12-27 at 21:25 -0500, James E Keenan wrote:

> $>  perl -MTest::More -E 'is(! 1, not 1);is(! 0, not 0);done_testing;'
[...]
> But now, try this, which simply adds a description to each test:

> 
> $ perl -MTest::More -E 'is(! 1, not 1, "test1");is(! 0, not 0, 
> "test2");done_testing;'

I think (the docs aren't 100% clear) that the optional third argument is
not the test name. ok() and is() take either
    actual value, expected value, test name
or
    true-if-ok, test name
so a test of
    is(false, "hello")
will correctly be reported as failed.


Liam


-- 
Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/
Pictures from old books: http://fromoldbooks.org/
Ankh: irc.sorcery.net irc.gnome.org freenode/#xml

-- 
Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/
Pictures from old books: http://fromoldbooks.org/
Ankh: irc.sorcery.net irc.gnome.org freenode/#xml



More information about the toronto-pm mailing list