dub test
Seb via Digitalmars-d
digitalmars-d at puremagic.com
Wed Aug 24 06:25:29 PDT 2016
On Wednesday, 24 August 2016 at 12:00:32 UTC, Andrei Alexandrescu
wrote:
> On 08/24/2016 04:14 AM, Edwin van Leeuwen wrote:
>> I might be dense, but the only other thing than integration
>> tests that I
>> can think of is if you use random data for testing, but that
>> would be
>> more correctly solved by using more random data during the
>> unittests.
>> Nothing is worse than tests that only sometimes fail.
>
> Randomized unit testing is a respected approach to testing:
> https://hackage.haskell.org/package/QuickCheck,
> https://github.com/rickynils/scalacheck,
> https://blogs.msdn.microsoft.com/dsyme/2008/08/08/fscheck-0-2/,
> etc. Some of the Phobos tests I wrote use it (and virtually all
> of my current code e.g. on median computation), and when they
> fail I just print the seed of the RNG and then hardcode it to
> reproduce the test. -- Andrei
Do you remember that there is a pending PR for this at Phobos
that is blocked because of missing feedback / acceptance?
https://github.com/dlang/phobos/pull/2995
More information about the Digitalmars-d
mailing list