dunit 0.7.0 released

linkrope linkrope at github.com
Sun Sep 29 14:06:15 PDT 2013


https://github.com/linkrope/dunit/tree/v0.7.0

The xUnit testing framework for D is used in production for one 
year now.

The latest changes are:
- added XML test reporting in JUnitReport format
- dub support
- changed @Ignore to @Ignore("reason to skip the test")
- added assertOp together with corresponding aliases
- added assertEmpty and assertNotEmpty
- extended assertArrayEquals to associative arrays

The XML reporting is currently used for a good integration with 
the CI tool Jenkins.

While the dunit/framework is best suited for "testing in the 
large", dunit/assertion can be used on its own in simple unittest 
blocks for improved failure messages:

unittest
{
     import dunit.assertion;

     assertArrayEquals([1: "foo", 2: "bar"], [1: "foo", 2: "baz"]);
}

You will get the following message:
array mismatch at key 2; expected: <ba<r>> but was: <ba<z>>

Even the difference between the string values "bar" and "baz" is 
highlighted within <...>.
(Still, I would wish for something like Python's ndiff for 
multi-line string values.)


More information about the Digitalmars-d-announce mailing list