Quit running foreign unittests >_<

Dicebot via Digitalmars-d digitalmars-d at puremagic.com
Wed Apr 29 04:46:49 PDT 2015


On Wednesday, 29 April 2015 at 07:44:17 UTC, Kagamin wrote:
> On Tuesday, 28 April 2015 at 16:40:05 UTC, Dicebot wrote:
>> Those are two points I fundamentally disagree with. It doesn't 
>> matter where the code comes from - in the end only thing that 
>> matters is correctness of your application as a whole.
>
> 3rd party libraries are supposed to be tested already, if you 
> want to test it, you should go and properly run its test suite. 
> Whatever template unittests you accidentally instantiated in 
> your code mean nothing with respect to overall correctness.

And software is supposed to not have bugs, right. I can put some 
trust in regular testing of Phobos but it ends there. If 
"accidental" template tests from user code break any 3d party 
library and its author refuses to accept PR with the fix I will 
simply call it broken and fork.

>> And if tests are written in a weird way that they can only be 
>> ran within that library test step, those are not really 
>> unittests.
>
> The library can be tested only when it's compiled in unittest 
> mode as a whole. When you link with its release version its 
> unittests are not even compiled at all.

Which is exactly why "all source builds with same flags" is the 
only reasonable compilation model for D. Providing release static 
libraries causes only problems and never benefits. Even for 
Phobos it feels like a mistake in the long run.


More information about the Digitalmars-d mailing list