unittest under betterC
Richard (Rikki) Andrew Cattermole
richard at cattermole.co.nz
Mon Jun 5 11:41:08 UTC 2023
On 05/06/2023 3:42 PM, ryuukk_ wrote:
> I don't know how all this works, but the runtime shouldn't know about
> tests, imagine if you ship a game, and the player can run all the
> unittests, that doesn't make sense
Currently that is not possible. When you turn on unittests to be
compiled in, that runtime will automatically run them and then end the
program.
> The compiler should run the unittest, the compiler should run the
> unittest, no matter what flag the programmer is using, in that case:
> -betterC
Run what?
Until its in a binary on the target platform (which may not be the
host), there is nothing to run.
Running using CTFE will not allow for testing for things that are
platform dependent. Which we do plenty of.
> You guys should read what you suggest to people sometimes, i repeat, D
> is not a new language, and D is not the only language, provide greatness
> to people, not dumb and broken stuff
It's not broken. It's working exactly how it needs to work.
You can't expect a runtime dependent feature that has no way of working
without a runtime, to work without a runtime.
More information about the Digitalmars-d-learn
mailing list