Phobos unittests either spuriously fail or spuriously pass

Seb via Digitalmars-d digitalmars-d at puremagic.com
Fri Aug 12 11:57:37 PDT 2016


On Friday, 12 August 2016 at 18:45:54 UTC, Andrei Alexandrescu 
wrote:
> I was surprised to see this in phobos master:
>
> make -f posix.mak unittest
>
> This passes. So do these:
>
> make -f posix.mak BUILD=debug unittest
> make -f posix.mak BUILD=release unittest
>
> Now, this also passes:
>
> make -f posix.mak BUILD=debug std/algorithm/sorting.test
>
> But this fails in std/algorithm/sorting.d line 2266!
>
> make -f posix.mak BUILD=release std/algorithm/sorting.test
>
> I'll investigate this. Any insight is welcome!
>
>
> Thanks,
>
> Andrei

That is known as well ;-)

std.algorithm.sorting fails in the individual test due to entropy 
behaving weird in std.math:

A couple of pointers:

- https://github.com/dlang/phobos/pull/4587 (recognizes this 
problem and ignores std.algorithm.sorting from Travis)
- https://github.com/dlang/phobos/pull/4719 (switches back to 
just run test_runner)


More information about the Digitalmars-d mailing list