Selective unittesting in DUB
Виталий Фадеев
vital.fadeev at gmail.com
Tue Dec 1 07:44:42 UTC 2020
On Wednesday, 21 December 2016 at 18:07:23 UTC, Nordlöw wrote:
> Is there a way to specify in dub.json (or any other file) that
> only a subset of the sources compiled and linked to a library
> or app should have they're unittests enabled?
Check this one:
app.d
------
Version ( DoubleBuffer )
{
unittest
{
// ...
}
}
else
{
unittest
{
// ...
}
}
or
unittest
{
Version ( DoubleBuffer )
{
// ...
}
// ...
}
dub.json
--------
{
...,
"buildTypes":
{
"debug":
{
"versions": [ "DoubleBuffer" ]
}
}
}
Or may be "pragma" can help you...
version ( Windows )
{
pragma( lib, "gdi32.lib" );
}
How to specify "DoubleBuffer" via dub's command line?...
More information about the Digitalmars-d-learn
mailing list