unittest "name" {}
IGotD-
nise at nise.com
Sun Feb 12 11:21:41 UTC 2023
On Saturday, 11 February 2023 at 21:25:50 UTC, Andrew wrote:
>
> In my opinion, the compiler doesn't really need to be
> responsible for all the bells and whistles in a modern testing
> framework; it just compiles code or it complains when it can't.
>
> The issue is that we as a community haven't rallied around a
> single best testing framework which expands upon the basic
> `unittest` functionality. Atila's "unit-threaded" might be the
> best contender so far, but it's not unanimous like pytest for
> python or junit for java.
One of the best things with D is the unit test support and how
easy it is to add it so I think it should definitely be in the
compiler or at least it should appear to be integrated.
Also what is opinionated is if the unit tests should be in the
same file or separate. I'm of the opinion that it should be in
the same file as then you are encouraged to create unit tests as
well changes to the code can also easily be reflected in unit
test. This is a matter of opinion and also if you want to use a
third party unit test framework, then you are free to do so.
I welcome named unit tests and it took a long time for it to even
be considered.
More information about the Digitalmars-d
mailing list