Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: 'either or' value unit test case in Test::Simple or Test::More

by Tanktalus (Canon)
on Jan 05, 2007 at 15:42 UTC ( [id://593134]=note: print w/replies, xml ) Need Help??


in reply to 'either or' value unit test case in Test::Simple or Test::More

Here's one that works in theory, but, in practice, doesn't. (I wonder if the Test::Builder owner would want to fix this ... probably not.)

use Quantum::Superpositions; is($var, any('a', 'b'), "it's a or b");
The idea is that you should be able to do this comparison ... but Test::Builder::_unoverload_str is used to convert the object that any returns into a string ... and that kills all the magic.

  • Comment on Re: 'either or' value unit test case in Test::Simple or Test::More
  • Download Code

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2024-04-25 16:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found