[Bf-blender-cvs] [d65f60764b4] blender-v2.83-release: GTest: BLI_ghash_performance_test was failing
Campbell Barton
noreply at git.blender.org
Mon May 25 12:52:36 CEST 2020
Commit: d65f60764b46bd8216d3ecaa6451589724f84f22
Author: Campbell Barton
Date: Mon May 25 20:46:56 2020 +1000
Branches: blender-v2.83-release
https://developer.blender.org/rBd65f60764b46bd8216d3ecaa6451589724f84f22
GTest: BLI_ghash_performance_test was failing
Change the seed from 0 to 1, so BLI_ghash_performance_test doesn't
assert with duplicate keys.
===================================================================
M tests/gtests/blenlib/BLI_ghash_performance_test.cc
===================================================================
diff --git a/tests/gtests/blenlib/BLI_ghash_performance_test.cc b/tests/gtests/blenlib/BLI_ghash_performance_test.cc
index ed00fb759cd..1002ff7d2df 100644
--- a/tests/gtests/blenlib/BLI_ghash_performance_test.cc
+++ b/tests/gtests/blenlib/BLI_ghash_performance_test.cc
@@ -277,7 +277,7 @@ static void randint_ghash_tests(GHash *ghash, const char *id, const unsigned int
unsigned int i;
{
- RNG *rng = BLI_rng_new(0);
+ RNG *rng = BLI_rng_new(1);
for (i = nbr, dt = data; i--; dt++) {
*dt = BLI_rng_get_uint(rng);
}
@@ -386,7 +386,7 @@ static void int4_ghash_tests(GHash *ghash, const char *id, const unsigned int nb
unsigned int i, j;
{
- RNG *rng = BLI_rng_new(0);
+ RNG *rng = BLI_rng_new(1);
for (i = nbr, dt = data; i--; dt++) {
for (j = 4; j--;) {
(*dt)[j] = BLI_rng_get_uint(rng);
@@ -493,7 +493,7 @@ static void int2_ghash_tests(GHash *ghash, const char *id, const unsigned int nb
unsigned int i, j;
{
- RNG *rng = BLI_rng_new(0);
+ RNG *rng = BLI_rng_new(1);
for (i = nbr, dt = data; i--; dt++) {
for (j = 2; j--;) {
(*dt)[j] = BLI_rng_get_uint(rng);
@@ -604,7 +604,7 @@ static void multi_small_ghash_tests(GHash *ghash, const char *id, const unsigned
{
printf("\n========== STARTING %s ==========\n", id);
- RNG *rng = BLI_rng_new(0);
+ RNG *rng = BLI_rng_new(1);
TIMEIT_START(multi_small_ghash);
More information about the Bf-blender-cvs
mailing list