[dmd-internals] changeset 455

Sean Kelly sean at invisibleduck.org
Wed May 5 12:39:39 PDT 2010


On May 5, 2010, at 9:37 AM, Andrei Alexandrescu wrote:

> Denis wrote:
>> On Tue, May 4, 2010 at 3:11 AM, Andrei Alexandrescu <andrei at erdani.com> wrote:
>> What's wrong with automatically wrapping unittests with try/catch
>> block? Why is the "bool g_runningUnittests;" even necessary?
>> Anyway, I believe top-level unittest assert behavior shouldn't differ
>> from other asserts.
> 
> That would be perfect.

I'd happily change the onUnittestError handler to throw an AssertError instead of printing and continuing, but the better fix would be to rip this new logic out of the compiler as well, so the handler isn't even needed.  Since we don't have macros in D2, I guess we'd really need a language-level "expect" function to get the correct file and line info in the log message.


More information about the dmd-internals mailing list