Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^3: Testing test function

by choroba (Chancellor)
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');
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Replies are listed 'Best First'.
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?
[Your Mother]: Regarding last unicorns… http://i.imgur. com/T3L9e.jpg
[marto]: also unicorn power
LanX still prefers Jesus vs Krishna
[LanX]: found it :)

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (14)
As of 2017-03-30 16:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (361 votes). Check out past polls.