Low level unit test library in druntime

Jacob Carlborg via Digitalmars-d digitalmars-d at puremagic.com
Tue Aug 30 09:17:30 PDT 2016


On 2016-08-30 16:54, Dicebot wrote:
> Definitely not in druntime. Optional extra test runners in Phobos (or
> libraries for higher level test suites) are reasonable but I don't want
> any changes to fundamentals of how _unit_ tests are defined and used.

You both are kind of missing the point. This would not be a runner in 
the same sense as the existing runners. It would be a low level library 
that a runner can use. If this would to be implemented the existing unit 
test runner in druntime would be updated to use this library. It would 
configure the library to behave exactly like the current runner work.

Since this library does collect any unit tests it's up to the code that 
uses the library to collect the tests. The runner in druntime would 
collect the tests exactly as it does now and those how tests are defined 
and used would not be changed at all.

The reason to put in the druntime is because that's where the existing 
runner is located.

The advantage of this low level library is that:

* Third party unit test library don't need to reinvent the wheel

* All third party libraries using this low level library would be 
compatible and can be combined in the same project

* If we would like to, it would be easy to extend the existing runner, 
like not stopping on the first failure. _Not_ saying that we should

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list