www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Please reply to this to vote to assertNotThrown in std.unittests

reply Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
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
next sibling parent reply David Nadlinger <see klickverbot.at> writes:
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
parent Andrej Mitrovic <andrej.mitrovich gmail.com> writes:
Voting Yes.
Feb 08 2011
prev sibling next sibling parent Daniel Gibson <metalcaedes gmail.com> writes:
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
prev sibling next sibling parent "Nick Sabalausky" <a a.a> writes:
"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
prev sibling next sibling parent Jim <bitcirkel yahoo.com> writes:
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
prev sibling next sibling parent "Lars T. Kyllingstad" <public kyllingen.NOSPAMnet> writes:
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
prev sibling parent Jens Mueller <jens.k.mueller gmx.de> writes:
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