First project: questions on how-to, and on language features
Ali Çehreli via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon Jan 25 10:48:19 PST 2016
On 01/24/2016 04:26 AM, Marc Schütz wrote:
>> (2) In the unittest code, I have a block that I want to rewrite using
>> assertThrown, but I can't figure out from either the book or the
>> website the correct usage. What's the right way to specify a
>> StringException with a particular message I expect to receive?
>
> Here's the relevant documentation:
> https://dlang.org/phobos/std_exception.html#.assertThrown
> https://dlang.org/phobos/std_exception.html#.collectExceptionMsg
Here is another link for completeness:
http://ddili.org/ders/d.en/unit_testing.html#ix_unit_testing.assertThrown,%20std.exception
Ali
More information about the Digitalmars-d-learn
mailing list