Severe 2.084 regression when using staticArray on array of struct with class and bool member

Jacob Carlborg doob at me.com
Tue Feb 12 19:28:00 UTC 2019


On 2019-02-12 19:33, John Colvin wrote:
> On Tuesday, 12 February 2019 at 18:26:56 UTC, jmh530 wrote:
>> For whatever strange reason, your post gave me a completely unrelated 
>> idea:
>>
>> When we have issues like this that get posted to bugzilla, there is 
>> (almost) always a code snippet, but unittests are only created when 
>> there an actual fix has been made. Except for what is in bugzilla 
>> DMD's source doesn't really know anything about the interaction of 
>> bugs. For instance, if fixing one bug would also fix another, we 
>> wouldn't know that unless someone marked a bug as duplicate.
>>
>> To improve the situation, we could add a unittest for every new bug. 
>> The immediate problem with this is that since these are bugs, they 
>> would all fail.
> 
> There are plenty of tests of things that fail already in the dmd test 
> suite, the only difference being that those are for things that *should* 
> fail.
> 
> I put this sort of idea to Walter 1 or 2 DConfs ago, I think the result 
> was "That sounds interesting, someone should do it".

Should be pretty straightforward to add to the new test runner [1]. It 
already looks for UDAs on unittest blocks. The tests look like this [2].

[1] https://github.com/dlang/dmd/blob/master/test/tools/unit_test_runner.d

[2] https://github.com/dlang/dmd/blob/master/test/unit/self_test.d

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list