i'm using VisualD.

this assertion fails assert(msg == "Null reference message");
in my actual code instead of variable _message an exception is thrown if (obj is null) == true.
i'm using the unittest block to test exception throwing.

...
        this(T obj)
        {
                if (obj is null){
                        throw new Exception("Null reference.");
                }
        }
...


unittest
{
        alias MyStruct!MyClass StructType;
        std.exception.assertThrown(StructType(null));   // Wrong assertion
}

Reply via email to