aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests
diff options
context:
space:
mode:
authorSimon Warta <[email protected]>2017-01-02 20:04:02 +0100
committerSimon Warta <[email protected]>2017-01-02 20:04:02 +0100
commit8387b027dcee25002842f83903b1f5190eaecd58 (patch)
tree1e649a7d0dc1b4cda9b287f10058ef1fb3279f03 /src/tests
parent6e4bd1f365a98517397aa11a44006c9ebd934bec (diff)
Rename ITERATIONS -> ITERATIONS_PER_POSSIBLE_VALUE
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/test_bigint.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tests/test_bigint.cpp b/src/tests/test_bigint.cpp
index 1d442a8bb..802e22ff8 100644
--- a/src/tests/test_bigint.cpp
+++ b/src/tests/test_bigint.cpp
@@ -133,7 +133,7 @@ class BigInt_Unit_Tests : public Test
result.start_timer();
- const size_t ITERATIONS = 500;
+ const size_t ITERATIONS_PER_POSSIBLE_VALUE = 500;
std::vector<size_t> min_ranges{ 0 };
std::vector<size_t> max_ranges{ 10 };
@@ -154,7 +154,7 @@ class BigInt_Unit_Tests : public Test
std::vector<size_t> counts(range_max - range_min);
- for(size_t i = 0; i != counts.size() * ITERATIONS; ++i)
+ for(size_t i = 0; i != counts.size() * ITERATIONS_PER_POSSIBLE_VALUE; ++i)
{
uint32_t r = BigInt::random_integer(Test::rng(), range_min, range_max).to_u32bit();
result.test_gte("random_integer", r, range_min);
@@ -164,7 +164,7 @@ class BigInt_Unit_Tests : public Test
for(size_t i = 0; i != counts.size(); ++i)
{
- double ratio = static_cast<double>(counts[i]) / ITERATIONS;
+ double ratio = static_cast<double>(counts[i]) / ITERATIONS_PER_POSSIBLE_VALUE;
double dev = std::min(ratio, std::fabs(1.0 - ratio));
if(dev < .15)