unit-threaded v0.7.45 - now with more fluency
Atila Neves
atila.neves at gmail.com
Sat May 5 13:28:41 UTC 2018
For those not in the know, unit-threaded is an advanced testing
library for D that runs tests in threads by default. It has a lot
of features:
http://code.dlang.org/packages/unit-threaded
New:
* Bug fixes
* Better integration testing
* unitThreadedLight mode also runs tests in threads
* More DDoc documentation (peer pressure from Adam's site)
* Sorta kinda fluent-like asserts
On the new asserts (should and should.be are interchangeable):
1.should == 1
1.should.not == 2
1.should.be in [1, 2, 3]
4.should.not.be in [1, 2, 3]
More controversially (due to a lack of available operators to
overload):
// same as .shouldApproxEqual
1.0.should ~ 1.0001;
1.0.should.not ~ 2.0;
// same as .shouldBeSameSetAs
[1, 2, 3].should ~ [3, 2, 1];
[1, 2, 3].should.not ~ [1, 2, 2];
I also considered adding `.should ~=`. I think it even reads
better, but apparently some people don't. Let me know?
The operator overloads are completely optional.
Atila
More information about the Digitalmars-d-announce
mailing list