Hi! Thanks for the fixes!
I hope we will end this eventually :)
See 2 comments below.
> diff --git a/test/unit/random.c b/test/unit/random.c
> new file mode 100644
> index 000000000..858ff7867
> --- /dev/null
> +++ b/test/unit/random.c
> @@ -0,0 +1,56 @@
> +#include <core/random.h>
> +
> +#include <stdio.h>
> +#include <assert.h>
> +
> +#include "unit.h"
> +
> +static void
> +test_random_in_range_one(int64_t min, int64_t max)
> +{
> + int64_t result = pseudo_random_in_range(min, max);
> + assert(min <= result && result <= max);
> + if (min == max)
> + printf("pseudo_random_in_range(%lld, %lld) = %lld\n",
> + (long long)min, (long long)max, (long long)result);
> +
> + result = real_random_in_range(min, max);
> + assert(min <= result && result <= max);
> + if (min == max)
> + printf("real_random_in_range(%lld, %lld) = %lld\n",
> + (long long)min, (long long)max, (long long)result);
1. By using printf as a checker you complicate Sergey's life in scope
of this
https://github.com/tarantool/tarantool/issues/5000. Because your
output is not TAP. Better not print anything except via helpers from
unit.h, and use ok()/is()/isnt() for actual tests.