Thread overview | ||||||||
---|---|---|---|---|---|---|---|---|
|
January 17, 2014 Up to date conformance test suite for compiler correctness? | ||||
---|---|---|---|---|
| ||||
Hi all, I am wondering if there is an up to date conformance test (compiler correctness) suite for D2. I located the dstress project on dsource.org, but it appears to be pre D2. With four different compiler implementations, please tell me that people are not insane. If people are insane (and no conformance suite exists), I think the easiest way to create one would be to produce a set of methods, one for each language construct/feature to be tested, that each return a string result. The collective results would constitute a "profile" of a given compiler, which could be saved. We would then pick one of the standard implementations as the "reference" implementation. Testing compliance would then be a matter of comparing your profile to the profile for the reference implementation. If people are insane (part 2): Does anybody have a good starting point? i.e. a collection of methods to begin constructing a D2 conformance suite? Regards, Ryan |
January 17, 2014 Re: Up to date conformance test suite for compiler correctness? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ryan | I just pulled the dstress source code down and looked at it in TortoiseHg Workbench. I see two check-ins on 19 August 2007 that seem to indicate D2 conformance. I will keep looking into this. |
January 17, 2014 Re: Up to date conformance test suite for compiler correctness? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ryan | On Friday, 17 January 2014 at 14:18:29 UTC, Ryan wrote:
> Hi all,
>
> I am wondering if there is an up to date conformance test (compiler correctness) suite for D2. I located the dstress project on dsource.org, but it appears to be pre D2.
>
> With four different compiler implementations, please tell me that people are not insane.
1) The 3 main compilers (dmd, gdc, ldc) share the majority of their frontend code. They aren't independent implementations like e.g. gcc/clang/icc/mvc/dmc etc...
2) All bugs fixed are accompanied by an addition to the test suite to test for regressions, which is also shared between compilers. While this isn't a systematic approach, it's quite a large set these days and is formed of pathological corner cases, which is exactly what you want.
|
January 17, 2014 Re: Up to date conformance test suite for compiler correctness? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ryan | Ryan: > I just pulled the dstress source code down and looked at it in TortoiseHg Workbench. > > I see two check-ins on 19 August 2007 that seem to indicate D2 conformance. I will keep looking into this. Compiler tests are added frequently: https://github.com/D-Programming-Language/dmd/tree/master/test Bye, bearophile |
January 17, 2014 Re: Up to date conformance test suite for compiler correctness? | ||||
---|---|---|---|---|
| ||||
Posted in reply to bearophile | On Friday, 17 January 2014 at 14:43:01 UTC, bearophile wrote:
> Ryan:
>
>> I just pulled the dstress source code down and looked at it in TortoiseHg Workbench.
>>
>> I see two check-ins on 19 August 2007 that seem to indicate D2 conformance. I will keep looking into this.
>
> Compiler tests are added frequently:
> https://github.com/D-Programming-Language/dmd/tree/master/test
>
> Bye,
> bearophile
If I'm reading this correctly then the latest set of unit tests for checking compatibility are integrated into the DMD source project itself. Is this correct?
|
January 17, 2014 Re: Up to date conformance test suite for compiler correctness? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ryan | On Friday, 17 January 2014 at 15:34:02 UTC, Ryan wrote:
> On Friday, 17 January 2014 at 14:43:01 UTC, bearophile wrote:
>> Ryan:
>>
>>> I just pulled the dstress source code down and looked at it in TortoiseHg Workbench.
>>>
>>> I see two check-ins on 19 August 2007 that seem to indicate D2 conformance. I will keep looking into this.
>>
>> Compiler tests are added frequently:
>> https://github.com/D-Programming-Language/dmd/tree/master/test
>>
>> Bye,
>> bearophile
>
> If I'm reading this correctly then the latest set of unit tests for checking compatibility are integrated into the DMD source project itself. Is this correct?
Yes.
And as John Colvin said, every bug that is fixed requires a relevant test to be added to the test suite.
|
Copyright © 1999-2021 by the D Language Foundation