Request for pre-review: std.serialization/orange

Jonathan M Davis jmdavisProg at gmx.com
Thu Sep 29 23:39:30 PDT 2011


On Thursday, September 29, 2011 20:58:30 Jacob Carlborg wrote:
> * For the unit tests I've used my own kind of micro unit test framework
> (that is included). Is that something we want to have in general in
> Phobos so other modules can take advantage of that? Or should I just rip
> out the framework?

I very much doubt that it would be accepted. assertPred failed to make it in 
spite of the various benefits that it provided, and a number of folks seem to 
be against more complicated unit testing features making it into Phobos. Not 
to mention, there's already some discussion of the unit tests taking too long. 
We aren't going to want anything that adds yet more overhead.

> * The unit tests are located in its own package, I'm not very happy
> about putting the unit tests in the same module as the rest of the code,
> i.e. the serialization module

Well, that's the way that Phobos does it, and it's essentially how D's unit 
tests are intended to work (though obviously, you can work around that if you 
really want to). Phobos' makefiles are set up with the idea that each module's 
unit tests are included in that module. I'm not sure that it's guaranteed that 
we wouldn't allow the unit tests to be separate, but that's not how any of the 
other Phobos unit tests works. And personally, I find that the unit tests are 
far more maintainable when they're right next to the functions that they test.

- Jonathan M Davis


More information about the Digitalmars-d mailing list