Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tests/gtests/blenlib/BLI_ghash_performance_test.cc')
-rw-r--r--tests/gtests/blenlib/BLI_ghash_performance_test.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/gtests/blenlib/BLI_ghash_performance_test.cc b/tests/gtests/blenlib/BLI_ghash_performance_test.cc
index 817f0b3d10a..709302db021 100644
--- a/tests/gtests/blenlib/BLI_ghash_performance_test.cc
+++ b/tests/gtests/blenlib/BLI_ghash_performance_test.cc
@@ -196,6 +196,21 @@ static void int_ghash_tests(GHash *ghash, const char *id, const unsigned int nbr
TIMEIT_END(int_lookup);
}
+ {
+ void *k, *v;
+
+ TIMEIT_START(int_pop);
+
+ GHashIterState pop_state = {0};
+
+ while (BLI_ghash_pop(ghash, &pop_state, &k, &v)) {
+ EXPECT_EQ(k, v);
+ }
+
+ TIMEIT_END(int_pop);
+ }
+ EXPECT_EQ(0, BLI_ghash_size(ghash));
+
BLI_ghash_free(ghash, NULL, NULL);
printf("========== ENDED %s ==========\n\n", id);