diff options
Diffstat (limited to 'main/tests/test_oa_hash_map.cpp')
-rw-r--r-- | main/tests/test_oa_hash_map.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/main/tests/test_oa_hash_map.cpp b/main/tests/test_oa_hash_map.cpp index 070420e432..bf5b4588ea 100644 --- a/main/tests/test_oa_hash_map.cpp +++ b/main/tests/test_oa_hash_map.cpp @@ -121,6 +121,25 @@ MainLoop *test() { delete[] keys; } + // regression test / test for issue related to #31402 + { + + OS::get_singleton()->print("test for issue #31402 started...\n"); + + const int num_test_values = 12; + int test_values[num_test_values] = { 0, 24, 48, 72, 96, 120, 144, 168, 192, 216, 240, 264 }; + + int dummy = 0; + OAHashMap<int, int> map; + map.clear(); + + for (int i = 0; i < num_test_values; ++i) { + map.set(test_values[i], dummy); + } + + OS::get_singleton()->print("test for issue #31402 passed.\n"); + } + return NULL; } } // namespace TestOAHashMap |