Boost logo

Boost :

Subject: Re: [boost] Add an adapter to cover fast bit functions
From: Evgeny Shulgin [Izaron] (izaronplatz_at_[hidden])
Date: 2018-08-28 09:38:38


Then, if we don't want to fix the values once and for all, we can still use
generating of 3-5mln of truly random values
for each large integral type (still with corner cases), but when comparing
naive functions (that are 100% working) and
fast ones (from the library), we can do something like this:

Instead of:
> BOOST_ASSERT(naive_outcome == fast_outcome);
Use this:
> if (naive_outcome != fast_outcome)
> {
> // Or std::cerr or printf
> std::cout << "LOOK AT ME: func_name failed on " << number
> << " real outcome " << naive_outcome
> << " library outcome " << fast_outcome << std::endl;
> BOOST_ASSERT(naive_outcome == fast_outcome);
> }
CI will run this on different machines using randomness, and it is more
likely to catch a bug, looking to its job log.

--
Sent from: http://boost.2283326.n4.nabble.com/Boost-Dev-f2600599.html

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk