specd - write more expressive unit tests
Jacob Carlborg
doob at me.com
Mon Sep 2 23:36:19 PDT 2013
On 2013-09-02 21:03, jostly wrote:
> specd is a DSL library allowing you to write more expressive unit tests.
> It is inspired by projects like specs2 and ScalaTest from the Scala world.
>
> Example:
>
> unittest {
> describe("a string")
> .should("have a length property", "foo".length.must.equal(3));
> }
>
> Features:
> * DSL for expressing unit tests as specifications
> * Verify with "must" instead of assert
> * Report successful / failed tests using green / red paradigm
>
> Available as a dub dependency ("specd") or from
> https://github.com/jostly/specd
>
> Comments and suggestions for improvement are welcome!
I've been working on something similar myself.
https://github.com/jacob-carlborg/dspec
I'm working on a new syntax using UDA's, shown here:
https://github.com/jacob-carlborg/phobos/blob/serialization/std/serialization/tests/array.d
--
/Jacob Carlborg
More information about the Digitalmars-d-announce
mailing list