[yul-phaser] Chromosome: Use more samples and higher tolerance in tests checking the distribution

- This makes them run a second longer (which might seem small but it's a 3x increase).
- Hopefully they will break less when the random seed changes.
This commit is contained in:
Kamil Śliwak
2020-09-14 16:17:39 +02:00
committed by chriseth
parent 5637bdcaec
commit ea1c249822
+4 -4
View File
@@ -73,8 +73,8 @@ BOOST_AUTO_TEST_CASE(makeRandom_should_return_different_chromosome_each_time)
BOOST_AUTO_TEST_CASE(makeRandom_should_use_every_possible_step_with_the_same_probability)
{
SimulationRNG::reset(1);
constexpr int samplesPerStep = 100;
constexpr double relativeTolerance = 0.01;
constexpr int samplesPerStep = 500;
constexpr double relativeTolerance = 0.02;
map<string, size_t> stepIndices = enumerateOptmisationSteps();
auto chromosome = Chromosome::makeRandom(stepIndices.size() * samplesPerStep);
@@ -149,8 +149,8 @@ BOOST_AUTO_TEST_CASE(optimisationSteps_should_translate_chromosomes_genes_to_opt
BOOST_AUTO_TEST_CASE(randomOptimisationStep_should_return_each_step_with_same_probability)
{
SimulationRNG::reset(1);
constexpr int samplesPerStep = 100;
constexpr double relativeTolerance = 0.01;
constexpr int samplesPerStep = 500;
constexpr double relativeTolerance = 0.02;
map<string, size_t> stepIndices = enumerateOptmisationSteps();
vector<size_t> samples;