|
Boost : |
Subject: Re: [boost] Add an adapter to cover fast bit functions
From: Christof Donat (cd_at_[hidden])
Date: 2018-08-28 07:52:44
Hi,
Am 28.08.2018 06:12, schrieb degski via Boost:
> On Tue, 28 Aug 2018 at 02:23, Evgeny Shulgin [Izaron] via Boost <
> boost_at_[hidden]> wrote:
>
>> > - For unit tests, it's better to use a prng instead of random_device.
>> > non-deterministic tests make it more difficult to reproduce
>> > test failures.
>> I'll change it, sounds good.
>>
>
> Yes, it sound good, but is it? I've been burned more than once by
> developing and testing a feature for something, thinking all was good
> and
> then remarkably stuff did not work in the real world. Ah, another seed
> would have caught this bug. I think some fuzzy testing is good, and you
> said it yourself (and the advice), the test has to be re-producible.
> Marrying the two is not impossible, but needs some thought, design and
> some
> more code.
Unit Tests are not the best place for fuzzing. You should do both. Unit
test
should be deterministic and always reproduce the same result, because
you'll
use them for debugging. Fuzzing on the other hand is used to find
unknown
bugs. When you found one, create a unit test to reproduce it, fix the
bug,
so that the unit test doesn't fail any more and continue fuzzing.
Christof
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk