Fix SCRIPT ERROR/ERROR/WARNING on test output

Also "fixing" some GDScript completion tests which
where named wrongly.
This commit is contained in:
Pablo Andres Fuente
2025-03-06 00:40:35 +01:00
parent 134da37497
commit 5775d29ad8
33 changed files with 30 additions and 13 deletions

View File

@ -235,9 +235,13 @@ TEST_CASE("[AHashMap] Insert, iterate and remove many elements") {
TEST_CASE("[AHashMap] Insert, iterate and remove many strings") {
const int elem_max = 432;
AHashMap<String, String> map;
// To not print WARNING: Excessive collision count (NN), is the right hash function being used?
ERR_PRINT_OFF;
for (int i = 0; i < elem_max; i++) {
map.insert(itos(i), itos(i));
}
ERR_PRINT_ON;
//insert order should have been kept
int idx = 0;

View File

@ -4492,7 +4492,8 @@ TEST_CASE("[SceneTree][CodeEdit] symbol lookup") {
Point2 caret_pos = code_edit->get_caret_draw_pos();
caret_pos.x += 60;
SEND_GUI_MOUSE_BUTTON_EVENT(caret_pos, MouseButton::NONE, 0, Key::NONE);
SEND_GUI_MOUSE_MOTION_EVENT(caret_pos, MouseButtonMask::NONE, Key::NONE);
CHECK(code_edit->get_text_for_symbol_lookup() == "this is s" + String::chr(0xFFFF) + "ome text");
SIGNAL_WATCH(code_edit, "symbol_validate");

View File

@ -8014,6 +8014,8 @@ TEST_CASE("[SceneTree][TextEdit] gutters") {
SIGNAL_WATCH(text_edit, "gutter_removed");
SUBCASE("[TextEdit] gutter add and remove") {
text_edit->set_text("test1\ntest2\ntest3\ntest4");
text_edit->add_gutter();
CHECK(text_edit->get_gutter_count() == 1);
CHECK(text_edit->get_gutter_width(0) == 24);

View File

@ -306,7 +306,7 @@ struct GodotTestCaseListener : public doctest::IReporter {
// So we have to do this for each test case. Also make sure there is
// no residual theme from something else.
ThemeDB::get_singleton()->finalize_theme();
ThemeDB::get_singleton()->initialize_theme_noproject();
ThemeDB::get_singleton()->initialize_theme();
#ifndef _3D_DISABLED
physics_server_3d = PhysicsServer3DManager::get_singleton()->new_default_server();