I often wrote my test code in the main function when developing the API, but since D integrated unittest, I want to start using them.
My current workflow is as follows: I have a script that monitors file changes in any .d files, if scripts detect a modified file, it will run dub build
The problem is that dub buildunittest doesn't seem to create
module foo
struct Bar{..}
unittest{
...
...
}
It only compiles unittests if I explicitly run it dub test. But I do not want to run and compile them at the same time.
The second problem is that I want to be able to run unittests for one module, for example
dub test module foo
Is it possible?