[Issue 11783] Make std.datetime unittesting faster

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Dec 21 21:25:54 PST 2013


https://d.puremagic.com/issues/show_bug.cgi?id=11783


Jonathan M Davis <jmdavisProg at gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jmdavisProg at gmx.com


--- Comment #3 from Jonathan M Davis <jmdavisProg at gmx.com> 2013-12-21 21:25:43 PST ---
I'm divided on this sort of thing, because I tend to think that other modules
actually test too little rather than std.datetime testing too much as far as
properly testing goes (I really do think that a lot of our testing is too
sparse - particularly when it comes to range based functions). However,
std.datetime's tests do need to be refactored, and the fact they take as long
as they do does stand out and is problematic. Thorough testing catches and
prevents bugs, but tests that take a long time get in the way of development.
One of the factors involved is the fact that D's exceptions are really slow -
issue# 9584 - which affects any test verifying that a function throws when it's
supposed to, and I expect that some refactoring of the order of some of what
the tests are doing would make them faster, but obviously the number of tests
involved makes it take longer regardless of what they're doing.

One possibility is to section of some of the tests so that they only run when a
particular version is set so that they don't run normally but can be turned on
when more thorough testing is warranted. Or I could move some of them into a
separate test suite (though that would mean that only I would have them, which
wouldn't be good). Regardless, there are ways to decrease how many tests are
run during the normal Phobos build without losing the tests. And any speed-ups
in the tests themselves would obviously also help.

Refactoring std.datetime's unit tests have been on my todo list for after I
finish splitting std.datetime (which is mostly done), but I've been completely
bogged down at work for the past few months, so I haven't been making any real
progress on anything D related lately (or anything else outside of work for
that matter). However, I expect to be able to get back to this sort of thing in
January or February.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list