digitalmars.D - Please reply to this to vote to assertNotThrown in std.unittests
- Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> Feb 08 2011
- David Nadlinger <see klickverbot.at> Feb 08 2011
- Andrej Mitrovic <andrej.mitrovich gmail.com> Feb 08 2011
- Daniel Gibson <metalcaedes gmail.com> Feb 08 2011
- "Nick Sabalausky" <a a.a> Feb 08 2011
- Jim <bitcirkel yahoo.com> Feb 08 2011
- "Lars T. Kyllingstad" <public kyllingen.NOSPAMnet> Feb 14 2011
- Jens Mueller <jens.k.mueller gmx.de> Feb 14 2011
Reply here to vote ONLY for the function assertNotThrown in Jonathan M Davis's std.unittests. Vote closes on Feb 15. Andrei
Feb 08 2011
On 2/8/11 4:30 PM, Andrei Alexandrescu wrote:Reply here to vote ONLY for the function assertNotThrown in Jonathan M Davis's std.unittests. Vote closes on Feb 15.
Sorry, I didn't phrase the part of my previous message concerning assertNotThrown and collectExceptionMsg quite clearly. What I meant is that I personally never felt the need for assertNotThrown and collectExceptionMsg, contrary to assertThrown, which I use pretty regularly. If others find these useful, I don't see any reasons not to include them, though. Concerning assertNotThrown specifically, I usually just call the function in question – if it throws unexpectedly, the exception makes the unit test fail anyway. This approach obviously doesn't allow you to filter only a single exception type, but I have a hard time trying to imagine where you would really need something like that. Also, you can't specify an extra assert message, but I'd rather like to be able to use named unit test blocks for that (what was the result of the discussion on them again?). David
Feb 08 2011
Am 08.02.2011 16:30, schrieb Andrei Alexandrescu:Reply here to vote ONLY for the function assertNotThrown in Jonathan M Davis's std.unittests. Vote closes on Feb 15. Andrei
Voting YES, because (quoting my post in another Thread): Maybe it can be nested like assertThrown!Exception( assertNotThrown!MyException( fun(42) ) ); to ensure that fun() doesn't throw a MyException, but does throws another Exception [which is a super-class of the Exception that may not be thrown]? Cheers, - Daniel
Feb 08 2011
"Andrei Alexandrescu" <SeeWebsiteForEmail erdani.org> wrote in message news:iirnmf$28ig$5 digitalmars.com...Reply here to vote ONLY for the function assertNotThrown in Jonathan M Davis's std.unittests. Vote closes on Feb 15.
"YES"
Feb 08 2011
Andrei Alexandrescu Wrote:Reply here to vote ONLY for the function assertNotThrown in Jonathan M Davis's std.unittests. Vote closes on Feb 15. Andrei
Yes!
Feb 08 2011
On Tue, 08 Feb 2011 10:30:08 -0500, Andrei Alexandrescu wrote:Reply here to vote ONLY for the function assertNotThrown in Jonathan M Davis's std.unittests. Vote closes on Feb 15. Andrei
Yes
Feb 14 2011
Andrei Alexandrescu wrote:Reply here to vote ONLY for the function assertNotThrown in Jonathan M Davis's std.unittests. Vote closes on Feb 15. Andrei
Yes. I find it useful. Jens
Feb 14 2011









David Nadlinger <see klickverbot.at> 