diff options
| author | Yuri Sizov <yuris@humnom.net> | 2023-09-04 18:07:16 +0200 |
|---|---|---|
| committer | Yuri Sizov <yuris@humnom.net> | 2023-09-04 18:07:16 +0200 |
| commit | 4328ffcc796ef916056b7c677761f6b979fad59a (patch) | |
| tree | 0e86e753a845e2cc8fe0621257e4c12e640d70f5 /tests/scene | |
| parent | 75de1ca76871fdf7f5a9e081aa57ec0e33061107 (diff) | |
| download | redot-engine-4328ffcc796ef916056b7c677761f6b979fad59a.tar.gz | |
Fix ThemeDB initialization in tests
Also fixes class name shadowing in Viewport/Window tests.
Diffstat (limited to 'tests/scene')
| -rw-r--r-- | tests/scene/test_viewport.h | 16 | ||||
| -rw-r--r-- | tests/scene/test_window.h | 6 |
2 files changed, 11 insertions, 11 deletions
diff --git a/tests/scene/test_viewport.h b/tests/scene/test_viewport.h index dd4786977e..0c53668c6d 100644 --- a/tests/scene/test_viewport.h +++ b/tests/scene/test_viewport.h @@ -43,8 +43,8 @@ namespace TestViewport { -class NotificationControl : public Control { - GDCLASS(NotificationControl, Control); +class NotificationControlViewport : public Control { + GDCLASS(NotificationControlViewport, Control); protected: void _notification(int p_what) { @@ -63,11 +63,11 @@ public: bool mouse_over = false; }; -// `NotificationControl`-derived class that additionally +// `NotificationControlViewport`-derived class that additionally // - allows start Dragging // - stores mouse information of last event -class DragStart : public NotificationControl { - GDCLASS(DragStart, NotificationControl); +class DragStart : public NotificationControlViewport { + GDCLASS(DragStart, NotificationControlViewport); public: MouseButton last_mouse_button; @@ -93,9 +93,9 @@ public: } }; -// `NotificationControl`-derived class that acts as a Drag and Drop target. -class DragTarget : public NotificationControl { - GDCLASS(DragTarget, NotificationControl); +// `NotificationControlViewport`-derived class that acts as a Drag and Drop target. +class DragTarget : public NotificationControlViewport { + GDCLASS(DragTarget, NotificationControlViewport); public: Variant drag_data; diff --git a/tests/scene/test_window.h b/tests/scene/test_window.h index e0c55101de..592cccfd7e 100644 --- a/tests/scene/test_window.h +++ b/tests/scene/test_window.h @@ -38,8 +38,8 @@ namespace TestWindow { -class NotificationControl : public Control { - GDCLASS(NotificationControl, Control); +class NotificationControlWindow : public Control { + GDCLASS(NotificationControlWindow, Control); protected: void _notification(int p_what) { @@ -69,7 +69,7 @@ TEST_CASE("[SceneTree][Window]") { w->set_content_scale_size(Size2i(200, 200)); w->set_content_scale_mode(Window::CONTENT_SCALE_MODE_CANVAS_ITEMS); w->set_content_scale_aspect(Window::CONTENT_SCALE_ASPECT_KEEP); - NotificationControl *c = memnew(NotificationControl); + NotificationControlWindow *c = memnew(NotificationControlWindow); w->add_child(c); c->set_size(Size2i(100, 100)); c->set_position(Size2i(-50, -50)); |
