in reply to Test::Exception extension with (evil?) overloading
Depending on what semantics you intend, this simple case seems to be adequately covered by either: is eval { $o->answer }, 42, 'answer returned 42'; ormy $result = lives_ok {$o->answer} 'answer worked'; is $result, 42, 'answer returned 42';
is do { lives_ok {$o->answer} 'answer worked' }, 42, 'answer returned 42';
The former treats the exception and is as a single test, the latter as two separate ones.
I looked at your Test::Exception and don't see any other tests that make sense to combine with a Test::More test.
So I'd say what you should do is document these memes in your POD rather than writing any code.
Makeshifts last the longest.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Test::Exception extension with (evil?) overloading
by adrianh (Chancellor) on Jan 18, 2003 at 17:45 UTC | |
by Aristotle (Chancellor) on Jan 18, 2003 at 17:52 UTC | |
by adrianh (Chancellor) on Jan 18, 2003 at 17:55 UTC |