Phobos unittests either spuriously fail or spuriously pass

Seb via Digitalmars-d digitalmars-d at puremagic.com
Fri Aug 12 12:03:53 PDT 2016


On Friday, 12 August 2016 at 18:57:37 UTC, Seb wrote:
> 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)

I answered to quickly:

1) entropy is in std.numeric, not std.math
2) the issue has been reported a month ago - 
https://issues.dlang.org/show_bug.cgi?id=16227
3) #4587 just found a workaround of 16227 for std.numeric, not 
for its caller


More information about the Digitalmars-d mailing list