Data-drive (aka table-driven) tests
Chris Wright via Digitalmars-d
digitalmars-d at puremagic.com
Fri Dec 4 13:45:57 PST 2015
On Fri, 04 Dec 2015 18:49:39 +0000, Russel Winder via Digitalmars-d wrote:
> Is anyone looking at enabling proper data-driven tests by example.
>
> I am finding that although this can be done trivially in dynamic
> languages, in static languages it is less so. Scala can do it due to the
> language semantics and macros. Rust cannot do it yet, the macro system
> isn't up to it. What about D? Has anyone tinkered with this?
Builtin unittest {} blocks are extremely convenient, but they're quite
low on features.
If specd still works, that would probably be much more suited to this
type of testing. http://code.dlang.org/packages/specd
> As an ancillary question: has anyone got a property-testing framework in
> D. The original is from Haskell, QuickCheck. Ceylon and similar
> languages have a pale imitation, Rust has the real thing.
http://code.dlang.org/packages/dcheck perhaps?
More information about the Digitalmars-d
mailing list