Re: Compiler generated assertion error message

2014-06-20 Thread Dicebot via Digitalmars-d
On Friday, 20 June 2014 at 20:04:32 UTC, Jacob Carlborg wrote: On 2014-06-19 19:52, Dicebot wrote: On a related topic: Feature like this is extremely convenient for unit tests. However using assertions in unit test blocks does not fit well with any custom test runner that does not immediately

Re: Compiler generated assertion error message

2014-06-20 Thread Jacob Carlborg via Digitalmars-d
On 2014-06-19 19:52, Dicebot wrote: On a related topic: Feature like this is extremely convenient for unit tests. However using assertions in unit test blocks does not fit well with any custom test runner that does not immediately terminate the application (because AssertionError is an Error).

Re: Compiler generated assertion error message

2014-06-19 Thread Walter Bright via Digitalmars-d
On 6/19/2014 10:44 AM, safety0ff wrote: A year and a half ago Andrej Mitrovic created a DMD pull ([1]) which implements dmd adding a prefix string containing the failing assertion to the assertion error's "msg" field. It appears to do more than that, such as always adding the assertion expressi

Re: Compiler generated assertion error message

2014-06-19 Thread Dicebot via Digitalmars-d
On a related topic: Feature like this is extremely convenient for unit tests. However using assertions in unit test blocks does not fit well with any custom test runner that does not immediately terminate the application (because AssertionError is an Error). I'd personally love some way to g

Compiler generated assertion error message

2014-06-19 Thread safety0ff via Digitalmars-d
A year and a half ago Andrej Mitrovic created a DMD pull ([1]) which implements dmd adding a prefix string containing the failing assertion to the assertion error's "msg" field. Unfortunately it triggered code generation bugs, issues #12852 & #12855, which have recently been fixed ([2] & [3].)