On Saturday, 5 March 2016 at 15:05:50 UTC, Casey wrote:
{
"name": "unittest",
"preBuildCommands": [
"dub run unit-threaded -c gen_ut_main -- -f bin/ut.d"
],
"mainSourceFile": "bin/ut.d",
"excludedSourceFiles": ["source/app.d"],
"dependences": {
"unit-threaded": "~>0.6.3"
}
}
If dub is complaining about not finding bin/ut.d, You need a
"importPaths": ["bin"] in there. Dub by default only looks in the
source folder, and it cannot find `bin/ut.d` in `./source`. If
that is the case you also need to remove the `source` part from
the excludedSourceFiles.
Here is a config that works for me
{
"name": "unittest",
"preBuildCommands": ["dub run unit-threaded -c gen_ut_main --
-f bin/ut.d"],
"importPaths": ["bin"],
"mainSourceFile": "bin/ut.d",
"excludedSourceFiles": ["app.d"],
"dependencies": {
"unit-threaded": "~>0.6.3"
}
}