Named unittests

Walter Bright newshound2 at digitalmars.com
Sun May 19 16:23:20 UTC 2019


On 5/19/2019 6:13 AM, Andrei Alexandrescu wrote:
> On 5/19/19 10:25 AM, Johannes Pfau wrote:
>> It runs some of the phobos unittests, those which are in templates
>> instantiated in user code:
> 
> That is correct, and seems desirable. Instantiations of library templated types 
> with user types should be tested during unittesting.

Which suggests a "best practices" of:

1. Unittesting the logic of the template in a unittest outside the scope of the 
template.

2. Unittests in the scope of the template should be testing the parts of the 
user types that the template needs.


More information about the Digitalmars-d mailing list