`unittest` placement in code?

Vladimirs Nordholm v at vladde.net
Mon Oct 26 13:16:32 UTC 2020


Hello.

I have a class which I have written some tests for, to ensure if 
I ever change some code it will still work as intended.

The documentation https://dlang.org/spec/unittest.html says it is 
can be placed both in the class or outside it.

I come from a background of having a completely separate tests 
folder with only tests, so I do not know what the general 
best-practice is with D. Where should the `unittest` code block 
go?


More information about the Digitalmars-d-learn mailing list