Skip to content
Permalink
Browse files

unit_tests: add more leeway to the "same distribution" check

This is an inherently probabilistic check, which occasionally fails
for a matching distribution
  • Loading branch information...
moneromooo-monero committed Jun 16, 2019
1 parent 6335509 commit f81cb4f24bfb3b2df40063263ffc3b64b5d73c2b
Showing with 2 additions and 2 deletions.
  1. +2 −2 tests/unit_tests/output_selection.cpp
@@ -211,10 +211,10 @@ TEST(select_outputs, same_distribution)
{
const double diff = (double)output_norm[i] - (double)chain_norm[i];
double dev = fabs(2.0 * diff / (output_norm[i] + chain_norm[i]));
ASSERT_LT(dev, 0.1);
ASSERT_LT(dev, 0.15);
avg_dev += dev;
}
avg_dev /= 100;
MDEBUG("avg_dev: " << avg_dev);
ASSERT_LT(avg_dev, 0.015);
ASSERT_LT(avg_dev, 0.02);
}

0 comments on commit f81cb4f

Please sign in to comment.
You can’t perform that action at this time.