diff options
Diffstat (limited to 'tests/test_macros.h')
-rw-r--r-- | tests/test_macros.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/tests/test_macros.h b/tests/test_macros.h index 6968f9df1f..b04c2117b7 100644 --- a/tests/test_macros.h +++ b/tests/test_macros.h @@ -31,10 +31,8 @@ #ifndef TEST_MACROS_H #define TEST_MACROS_H -#include "core/object/callable_method_pointer.h" -#include "core/object/class_db.h" -#include "core/string/print_string.h" -#include "core/templates/map.h" +#include "core/input/input_map.h" +#include "core/object/message_queue.h" #include "core/variant/variant.h" // See documentation for doctest at: @@ -135,7 +133,7 @@ int register_test_command(String p_command, TestFunc p_function); // Utility macros to send an event actions to a given object // Requires Message Queue and InputMap to be setup. // SEND_GUI_ACTION - takes an object and a input map key. e.g SEND_GUI_ACTION(code_edit, "ui_text_newline"). -// SEND_GUI_KEY_EVENT - takes an object and a keycode set. e.g SEND_GUI_KEY_EVENT(code_edit, KEY_A | KEY_MASK_CMD). +// SEND_GUI_KEY_EVENT - takes an object and a keycode set. e.g SEND_GUI_KEY_EVENT(code_edit, Key::A | KeyModifierMask::CMD). // SEND_GUI_MOUSE_EVENT - takes an object, position, mouse button and mouse mask e.g SEND_GUI_MOUSE_EVENT(code_edit, Vector2(50, 50), MOUSE_BUTTON_NONE, MOUSE_BUTTON_NONE); // SEND_GUI_DOUBLE_CLICK - takes an object and a postion. e.g SEND_GUI_DOUBLE_CLICK(code_edit, Vector2(50, 50)); @@ -174,7 +172,7 @@ int register_test_command(String p_command, TestFunc p_function); #define SEND_GUI_DOUBLE_CLICK(m_object, m_local_pos) \ { \ - _CREATE_GUI_MOUSE_EVENT(m_object, m_local_pos, MOUSE_BUTTON_LEFT, MOUSE_BUTTON_LEFT); \ + _CREATE_GUI_MOUSE_EVENT(m_object, m_local_pos, MouseButton::LEFT, MouseButton::LEFT); \ event->set_double_click(true); \ m_object->get_viewport()->push_input(event); \ MessageQueue::get_singleton()->flush(); \ |