On 2010-05-05 05:10:05 -0400, bearophile <bearophileh...@lycos.com> said:

unittest {
    assert(throws!(OtherException)(sqr(-5)));
    assert(throws!(OtherException)( sqr(-5) ));
}

While the static throws can require more compiler support.

Can't you do:

        static assert(throws!OtherException(sqrt(-5)));

?

--
Michel Fortin
michel.for...@michelf.com
http://michelf.com/

Reply via email to