|
Blender
V3.3
|
#include "testing/testing.h"#include "BLI_ghash.h"#include "BLI_rand.h"#include "BLI_utildefines.h"Go to the source code of this file.
Macros | |
| #define | GHASH_INTERNAL_API |
| #define | TESTCASE_SIZE 10000 |
| #define | PRINTF_GHASH_STATS(_gh) |
Functions | |
| static void | init_keys (unsigned int keys[TESTCASE_SIZE], const int seed) |
| TEST (ghash, InsertLookup) | |
| TEST (ghash, InsertRemove) | |
| TEST (ghash, InsertRemoveShrink) | |
| TEST (ghash, Copy) | |
| TEST (ghash, Pop) | |
| #define GHASH_INTERNAL_API |
Definition at line 5 of file BLI_ghash_test.cc.
| #define PRINTF_GHASH_STATS | ( | _gh | ) |
Definition at line 14 of file BLI_ghash_test.cc.
| #define TESTCASE_SIZE 10000 |
Definition at line 11 of file BLI_ghash_test.cc.
|
static |
Definition at line 37 of file BLI_ghash_test.cc.
References BLI_rng_free(), BLI_rng_get_uint(), BLI_rng_new(), seed, t, and TESTCASE_SIZE.
Referenced by TEST().
| TEST | ( | ghash | , |
| Copy | |||
| ) |
Definition at line 140 of file BLI_ghash_test.cc.
References BLI_ghash_buckets_len(), BLI_ghash_copy(), BLI_ghash_free(), BLI_ghash_insert(), BLI_ghash_len(), BLI_ghash_lookup(), BLI_ghash_new(), BLI_ghashutil_intcmp(), BLI_ghashutil_inthash_p(), EXPECT_EQ(), ghash_copy(), init_keys(), POINTER_AS_UINT, POINTER_FROM_UINT, TESTCASE_SIZE, and v.
| TEST | ( | ghash | , |
| InsertLookup | |||
| ) |
Definition at line 61 of file BLI_ghash_test.cc.
References BLI_ghash_free(), BLI_ghash_insert(), BLI_ghash_len(), BLI_ghash_lookup(), BLI_ghash_new(), BLI_ghashutil_intcmp(), BLI_ghashutil_inthash_p(), EXPECT_EQ(), init_keys(), POINTER_AS_UINT, POINTER_FROM_UINT, TESTCASE_SIZE, and v.
| TEST | ( | ghash | , |
| InsertRemove | |||
| ) |
Definition at line 85 of file BLI_ghash_test.cc.
References BLI_ghash_buckets_len(), BLI_ghash_free(), BLI_ghash_insert(), BLI_ghash_len(), BLI_ghash_new(), BLI_ghash_popkey(), BLI_ghashutil_intcmp(), BLI_ghashutil_inthash_p(), EXPECT_EQ(), init_keys(), POINTER_AS_UINT, POINTER_FROM_UINT, TESTCASE_SIZE, and v.
| TEST | ( | ghash | , |
| InsertRemoveShrink | |||
| ) |
Definition at line 112 of file BLI_ghash_test.cc.
References BLI_ghash_buckets_len(), BLI_ghash_flag_set(), BLI_ghash_free(), BLI_ghash_insert(), BLI_ghash_len(), BLI_ghash_new(), BLI_ghash_popkey(), BLI_ghashutil_intcmp(), BLI_ghashutil_inthash_p(), EXPECT_EQ(), GHASH_FLAG_ALLOW_SHRINK, init_keys(), POINTER_AS_UINT, POINTER_FROM_UINT, TESTCASE_SIZE, and v.
| TEST | ( | ghash | , |
| Pop | |||
| ) |
Definition at line 170 of file BLI_ghash_test.cc.
References BLI_ghash_flag_set(), BLI_ghash_free(), BLI_ghash_insert(), BLI_ghash_len(), BLI_ghash_new(), BLI_ghash_pop(), BLI_ghashutil_intcmp(), BLI_ghashutil_inthash_p(), EXPECT_EQ(), GHASH_FLAG_ALLOW_SHRINK, init_keys(), POINTER_FROM_UINT, TESTCASE_SIZE, and v.