External lib unittests: they're killin me!

Jacob Carlborg doob at me.com
Tue May 21 05:57:59 PDT 2013


On 2013-05-21 14:34, Jens Mueller wrote:

> I have already seen it. I'm also looking for a more natural way to write
> tests. dspec goes in that direction but I found its syntax
> (describe("...") in {} and it("...") in {}) not convincing.

I really, REALLY would like to be able to have a syntax like this:

describe("foo")
{
     it("bar")
     {
         // asserts
     }
}

> I was thinking about something like
> a.should == 10;
> or similar. But that has its own problems. Anyway writing/executing
> unittests in D needs to become more fun.

That syntax is the next step for dspec. But that would be put inside the 
it-blocks, not instead of. It would be instead of the asserts.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list