From 438b706d4369d3e1da75edb3be344e2810236ad6 Mon Sep 17 00:00:00 2001 From: Marcel Admiraal Date: Sat, 16 Jul 2022 17:42:04 +0100 Subject: [PATCH] Fix TextEdit test dependency on SceneTree's initial process time > 0 --- tests/scene/test_text_edit.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/scene/test_text_edit.h b/tests/scene/test_text_edit.h index 4098dd7acee..5d969b1fbc4 100644 --- a/tests/scene/test_text_edit.h +++ b/tests/scene/test_text_edit.h @@ -3139,7 +3139,7 @@ TEST_CASE("[SceneTree][TextEdit] viewport") { v_scroll = text_edit->get_v_scroll(); SEND_GUI_MOUSE_BUTTON_EVENT(text_edit, Point2i(10, 10), MouseButton::WHEEL_DOWN, MouseButton::WHEEL_DOWN, Key::NONE); text_edit->notification(TextEdit::NOTIFICATION_INTERNAL_PHYSICS_PROCESS); - CHECK(text_edit->get_v_scroll() > v_scroll); + CHECK(text_edit->get_v_scroll() >= v_scroll); SEND_GUI_MOUSE_BUTTON_EVENT(text_edit, Point2i(10, 10), MouseButton::WHEEL_UP, MouseButton::WHEEL_UP, Key::NONE); text_edit->notification(TextEdit::NOTIFICATION_INTERNAL_PHYSICS_PROCESS); CHECK(text_edit->get_v_scroll() == v_scroll); @@ -3148,7 +3148,7 @@ TEST_CASE("[SceneTree][TextEdit] viewport") { text_edit->set_v_scroll_speed(10000); SEND_GUI_MOUSE_BUTTON_EVENT(text_edit, Point2i(10, 10), MouseButton::WHEEL_DOWN, MouseButton::WHEEL_DOWN, Key::NONE); text_edit->notification(TextEdit::NOTIFICATION_INTERNAL_PHYSICS_PROCESS); - CHECK(text_edit->get_v_scroll() > v_scroll); + CHECK(text_edit->get_v_scroll() >= v_scroll); SEND_GUI_MOUSE_BUTTON_EVENT(text_edit, Point2i(10, 10), MouseButton::WHEEL_UP, MouseButton::WHEEL_UP, Key::NONE); text_edit->notification(TextEdit::NOTIFICATION_INTERNAL_PHYSICS_PROCESS); CHECK(text_edit->get_v_scroll() == v_scroll);