How can one reliably run unittests

deadalnix deadalnix at gmail.com
Fri Sep 3 01:08:25 UTC 2021


On Friday, 3 September 2021 at 00:34:01 UTC, jfondren wrote:
> Well, there's someone in the thread who keeps complaining about 
> random dmd flags, which both draws defenses of those flags and 
> proposals to change them that won't actually give you the 
> workflow you want (like the -unittest= proposal, that still 
> requires you to tell dmd about where all your modules are, 
> which would still be irritating for dub dependencies).

I'll be blunt, but this is needed because this whole thread is 
retarded.

The current flag's behavior make no sense. They are not useful. 
They don't so something sensible. They don't serve typical use 
cases. The whole thing is completely retarded.

Yes, improving unittest as some suggest would be an improvement. 
But it doesn't address the core problem. The `-main` situation 
remains retarded. It is still not possible to run the unittest of 
several modules this way, etc...

And here is the root problem: something is complete trash and 
yet, not only I'm told this is normal and expected, but I'm 
supposed to be happy with it. By yourself, by Walter, by Steven. 
You guys are obviously smart, but you aren't looking at this 
straight or even at all. Or you are drowning in so much trash you 
don't even see it anymore, like a fish in water. In don't know. 
But this is alarming.

In fact, people went through the length of migrating the whole 
standard library to use the StdUnittest version to work around 
the problem I'm pointing. Think about it. people would rather 
change how all the tests of the standard lib work rather than fix 
this shit. This is insane. Literally.

WAKE UP!

This is bad. This is really bad. Stop making excuses. It's time 
to ask, how did this get this way and what can be done so that 
this never ever happens again.

Consider the following. You work in a car company. The eng team 
just came up with this new design with the engine bolted on the 
roof of the car. You tell them "Guys, this does not make sense, 
nobody is going to want a car with the engine on the roof." and 
they respond to you "Well, this is how it is, you can get better 
cooling this way and yada yada yada...", what would you think? 
That these people need a technical solution? No, these people 
need an intervention. They are building a car for people to use, 
right?

Well, jfondren, you need an intervention. Stop. Take a break and 
think. You need to look at this with a fresh eye. You have been 
in this crap for too long and can't see straight anymore.

The set of flags the compiler propose is complete nonsense that 
do not serve users, it has cause major rewrite in the standard 
library, and motivated the creating of a new test framework per 
large project. This needs to stop.


More information about the Digitalmars-d mailing list