Closed SirNickolas closed 8 months ago
Could you please elaborate what the actual problem is? Writing to stderr/stdout in unit tests is not a problem. Do you mean that library unit tests are executed when users run unit tests for their apps?
Do you mean that library unit tests are executed when users run unit tests for their apps?
Please, excuse me. I believed so. Several years ago, dub build -b unittest
(or was it -c unittest
?..) had been building every dependency with unit tests enabled. I haven’t noticed it changed the behavior: now only the main package has -unittest
passed to the compiler invocation so library unit tests are not run anymore (unless it is a sourceLibrary
).
I agree it was a better idea to fix it in the toolchain rather than force every library to deal with it somehow.
Currently, unit tests write to both stdout and stderr. They should do neither because they are run by clients of the library.