dunit r247

Christopher Wright dhasenan at gmail.com
Wed Mar 18 19:45:46 PDT 2009


Hi all,

I've released a new version of dunit, r247. (I have finally decided on
subversion revision numbers as a simple, unambiguous versioning scheme).
It's recommended for immediate use and is certified alpha-quality software.

Documentation and Downloads
---------------------------
Documentation is included in the .zip file and also on the wiki.
Docs: http://dsource.org/projects/dmocks/wiki/DUnit
Download: 
http://dsource.org/projects/dmocks/browser/downloads/dunit.r247.zip?format=raw

Assertions
----------
The major production-ready element of dunit is a greatly-tweaked
assertion system. There are minor API changes; in general, you can convert:
	expect(value).constraint;
to:
	expect(value, constraint);

Additionally, you can combine constraints using | or &:
expect(6, equals(3) | greaterThan(5));

Additionally, it is much more reasonable to add additional messages to
an assertion:
expect(foo(), lessThan(5), "foo is being mean again!");

The assertions system is now extensible; deriving from
dunit.assertions.model.Constraint will allow you to use your constraint
as if it were a regular, builtin constraint.

Parameterized tests
-------------------
A parameterized test is one that uses data generated externally. Dunit
now supports parameterized testing. The builtin parameterization systems
are combinatorial and sequential, with test data generators for random
and sequential integers and floating point values.


More information about the Digitalmars-d-announce mailing list