Change randomValue function's maximum value #251
Labels
good first issue
An issue is perfectly suitable for first comers. A very minimal knowledge of the project is required
help wanted
We need a help
improvement
Upgrade existing feature
performance tests
Project related performance tests
unit tests
Project related unit tests
Milestone
We have a function
randomValue
template function in unit and performance tests (test/unit_tests/unit_test_helper.h
andtest/performance_tests/performance_test_helper.h
) which has a body:This function leads to misunderstand because maximum value is actually a limit which cannot be reached. There are multiple possible solutions to this problem:
rand() % maximum
torand() % (maximum + 1)
. After this we have to change all calls of this function.maximum
variable name to something more understandableThen we would cover almost all cases for initial function usage.
The text was updated successfully, but these errors were encountered: