unittests are really part of the build, not a special run
Nick Sabalausky via Digitalmars-d
digitalmars-d at puremagic.com
Wed Apr 1 10:09:41 PDT 2015
On 03/31/2015 05:12 PM, Atila Neves wrote:
> I actually thought about the whole "it should fail to build if any of
> the unit tests fail" idea 2 or 3 weeks ago, so this sounds good.
>
> WRT to the error messages and their recognition by text editors, a
> _massive_ improvement would be compiler-assisted formatting of the
> assertion errors. This:
>
> core.exception.AssertError at foo.d(2): Assertion failure
>
> Is not useful when I wrote `assert(foo == 2)`. This, however, is:
>
> tests.encode.testEncodeMoreThan8Bits:
> tests/encode.d:166 - Expected: [158, 234, 3]
> tests/encode.d:166 - Got: [158, 234]
>
>
Yea, at one point, a whole system of nifty asserts that did just that
was created and submitted to Phobos. It was quickly rejected because
people said regular assert could, and would, easily be made to do the
same thing.
That was several years ago and absolutely nothing has happened. We
*could've* at least had it in the std library all these years. But the
preference was for vaporware. And now we're back to square one with
"Whaddya need sometin' like that for anyway?" >_<
More information about the Digitalmars-d
mailing list