bearophile wrote: > Jonathan M Davis: > > > While improvements can be > > made to how unit tests work in D, I believe that that should be addressed > > by > > actually making those improvements to the core language as opposed to using > > a > > module in Phobos to change things. You shouldn't _need_ std.unittests to > > write > > unit testing code. > > I think it's wrong to design a built-in unit test system able to do most of > the things a real unit test system is expected to work, because it's a lot of > stuff and because 10-15 years from now the best design for an unit test > system may be different, and there are different ways to create tests. So I > prefer the built-in unit test features to allow the creation of a good > standard library unit test system based on the built-in one, working as an > extension. In little programs you are free to use the built-in one.
I agree with bearophile. Unit testing can be implemented on top of the language and shouldn't be put into it. Somehow I have the feeling that too often one tries to extend the language even though the feature could be implemented in a library. I like the basic built-in support for unit testing in D but more advanced testing should be implemented in a module ideally leading to something like GoogleTest for D. I think unittest.d does a good step into that direction. More will be needed, if there is consensus. Jens