Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^3: Testing test function

by choroba (Canon)
on Sep 26, 2013 at 11:32 UTC ( #1055821=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Testing test function
in thread Testing test function

Untested: What about

ok(! eval { test_foo(a=>2) ; 1}, 'test_foo() should fail for a=2'); is($@, 'invalid argument', 'expected error');
لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ


Comment on Re^3: Testing test function
Download Code
Re^4: Testing test function
by sedusedan (Monk) on Sep 27, 2013 at 06:18 UTC
    I'm afraid that wouldn't work, because test_foo() emits TAP as well as uses the same Test::Builder instance (since it uses Test::More also) and will interfere with the test script.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1055821]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (14)
As of 2015-07-06 15:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (77 votes), past polls