diff options
Diffstat (limited to 'main/tests')
-rw-r--r-- | main/tests/test_gui.h | 3 | ||||
-rw-r--r-- | main/tests/test_oa_hash_map.cpp | 19 | ||||
-rw-r--r-- | main/tests/test_physics.h | 4 | ||||
-rw-r--r-- | main/tests/test_render.h | 4 | ||||
-rw-r--r-- | main/tests/test_string.cpp | 5 |
5 files changed, 24 insertions, 11 deletions
diff --git a/main/tests/test_gui.h b/main/tests/test_gui.h index 1752818981..075bc40aa7 100644 --- a/main/tests/test_gui.h +++ b/main/tests/test_gui.h @@ -33,9 +33,6 @@ #include "core/os/main_loop.h" -/** - @author Juan Linietsky <reduzio@gmail.com> -*/ namespace TestGUI { MainLoop *test(); 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 diff --git a/main/tests/test_physics.h b/main/tests/test_physics.h index 699e31f492..a281f669e0 100644 --- a/main/tests/test_physics.h +++ b/main/tests/test_physics.h @@ -31,10 +31,6 @@ #ifndef TEST_PHYSICS_H #define TEST_PHYSICS_H -/** - @author Juan Linietsky <reduzio@gmail.com> -*/ - #include "core/os/main_loop.h" namespace TestPhysics { diff --git a/main/tests/test_render.h b/main/tests/test_render.h index 3810760b56..6dda57db5b 100644 --- a/main/tests/test_render.h +++ b/main/tests/test_render.h @@ -31,10 +31,6 @@ #ifndef TEST_RENDER_H #define TEST_RENDER_H -/** - @author Juan Linietsky <reduzio@gmail.com> -*/ - #include "core/os/main_loop.h" namespace TestRender { diff --git a/main/tests/test_string.cpp b/main/tests/test_string.cpp index ab5fb64252..7a41880645 100644 --- a/main/tests/test_string.cpp +++ b/main/tests/test_string.cpp @@ -432,6 +432,10 @@ bool test_26() { OS::get_singleton()->print("\n\nTest 26: RegEx substitution\n"); +#ifndef MODULE_REGEX_ENABLED + OS::get_singleton()->print("\tRegEx module disabled, can't run test."); + return false; +#else String s = "Double all the vowels."; OS::get_singleton()->print("\tString: %ls\n", s.c_str()); @@ -443,6 +447,7 @@ bool test_26() { OS::get_singleton()->print("\tResult: %ls\n", s.c_str()); return (s == "Doouublee aall thee vooweels."); +#endif } struct test_27_data { |