Please vote on std.datetime

Jonathan M Davis jmdavisProg at gmx.com
Thu Dec 9 19:02:53 PST 2010


On Thursday 09 December 2010 18:53:24 Seth Hoenig wrote:
> +1 for inclusion, including the unittests just the way they are.

:)
 
> Why? Because I've been waiting for a decent datetime module for a while and
> this looks like one. There's no good reason not to include the unittests.
> Yes, there is an abundance of them. But there's _huge_ potential for small,
> off-by-one bugs in something like this, and I think maximum coverage, even
> if some of it overlaps, can only be a good thing.

Well, yes, the unit tests need to be included. What I meant was the unit test 
helper functions that I have. I have several functions - such as assertEqual() 
and assertExThrown() - which really improve the unit tests that I have. There is 
a unittests module in my code which contains these functions, and ideally, I'd 
like that module added as std.unittests. If it's not added, then those functions 
need to be added as private functions in std.datetime, or you lose the unit 
tests (or have to do  _lot_ of work to change them, which would be a net loss in 
quality). I don't think that anyone is really suggesting that the unittest 
blocks be removed. The question with regards to unit tests is whether the 
unittests module should become std.unittests (which is why I created a separate 
thread semi-recently to review that code separately rather than as part of 
std.datetime).

- Jonathan M Davis


More information about the Digitalmars-d mailing list