Project structure and unit tests

Carlos Adriano Portes xcap2000 at outlook.com
Sat Dec 20 01:29:12 UTC 2025


Hi,

I am trying to create the following structure for a project using 
dub:

project
|--src
|--test

I am strugling to make this setup work, I would like to put all 
my unit tests (I am not using any testing library) on the test 
folder and reference code from src folder. I can run dub run and 
dub test successfully but dub test is not running any of the 
tests contained in the files under test folder. Tried multiple 
variations of the dub.json configuration with no success. If 
possible I would like to build for testing as a library.

Repository:
https://github.com/xcap2000/d-002

I am not a D expert, I am trying to learn when I have free time.

Kind regards,

Carlos Adriano Portes




More information about the Digitalmars-d-learn mailing list