Project structure and unit tests
Andre
andre at s-e-a-p.de
Sun Dec 21 20:08:19 UTC 2025
On Saturday, 20 December 2025 at 18:44:11 UTC, Carlos Adriano
Portes wrote:
> On Saturday, 20 December 2025 at 01:29:12 UTC, Carlos Adriano
> Portes wrote:
>> [...]
>
> The problem was solved, it turned out to be that I can't have
> the same module name in different files like C# namespaces, so
> the equivalent test modules I prefixed with "tests.".
>
> Another problem I am facing is that I am using package.d files
> to kind of simulate namespaces in C#, and I added unit-threaded
> package to have a better output for the "dub test" output. It
> seems that unit-threaded did not like the way I am using
> packages and does not generate bin/ut.d file correctly.
>
> I did a workaround by running "dub test", changing the
> generated bin/ut.d, chaging the dub.json to generate bin/ut2.d
> thus not overriding the one I changed. Whenever adding new
> packages will have to redo this work again.
>
> Is anyone aware of this problem?
>
> Kind regards,
>
> Carlos Adriano Portes
Hi,
In case the framework d-unit is an option for you, this is the
structure I use for my projects:
https://andre2007.github.io/d-tips/dub/application_template/
Kind regards
André
More information about the Digitalmars-d-learn
mailing list