CURL Wrapper: Congratulations Next up: std.serialize

Jacob Carlborg doob at me.com
Sun Jan 1 06:31:18 PST 2012


On 2011-12-31 21:56, Jonathan M Davis wrote:
> On Saturday, December 31, 2011 16:06:49 Jacob Carlborg wrote:
>> BTW, what would be so wrong if the unit tests for the standard library
>> displayed a nice report when finished?
>
> My primary issue here is that I don't think that we should be adding stuff to
> Phobos which is essentially a new unit test framework on top of the built in
> one. If 3rd party stuff wants to do that. Fine. But the standard library should
> use the standard facilities. If the standard facilities aren't sufficient, then
> they should be improved.

First, that's how programming works. You build new abstractions on top 
of existing ones. Second, I would called the built in support for unit 
testing in D a "unit test framework". If add a unit test framework to 
Phobos it would be standard facilities and it wouldn't be a problem.

> As for a "nice report," I don't see anything wrong with just using the stack
> traces (which include the file, line number, and error message of the assertion
> failure). That's all the information that's needed. Anything else is
> superfluous IMHO. Now, if there were something nicer that could be generally
> agreed upon and added to druntime such that the standard unit test facilities
> used it, then fine. I don't see any point to it, but at least in that case, the
> standard library is still using the standard unit test framework. What I
> really don't want to see is Phobos essentially building a new unit test
> framework on top of the existing one. Any issues that need to be addressed
> with the unit test framework for the standard library should be addressed in
> the standard framework. Any additional framework stuff should be left to 3rd
> parties.
>
> - Jonathan M Davis

What's wrong with being able to run the unit tests from your editor, 
have the unit test framework output HTML (or similar), displayed in your 
editor and then you can click on links in the stack trace to get to the 
source code. If you don't see why that's useful that we can just end 
this discussion now.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list