On Wednesday, 11 August 2021 at 11:44:42 UTC, Steven
Schveighoffer wrote:
On 8/11/21 5:31 AM, tastyminerals wrote:
[...]
`dub -b unittest` should work (you don't need the extra build
type stuff)
dub test does something funky -- it removes the *whole module*
where your main function is (if you identify it, or if it's
`app.d`) and then builds its own main module. Why does it do
this? Legacy reasons, the runtime used to run main after
running unittests, which dub didn't want to do. It also is
useful on a library where there is no main function.
However, dub with a build type of `unittest` just enables the
unittest switch, and builds all your stuff as normal.
-Steve
I see. Thank you for a detailed answer! I just with this was
somehow reflected in the DUB docs...