feat: modules moved and engine moved to submodule
This commit is contained in:
parent
dfb5e645cd
commit
c33d2130cc
5136 changed files with 225275 additions and 64485 deletions
|
|
@ -28,8 +28,7 @@
|
|||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/**************************************************************************/
|
||||
|
||||
#ifndef TEST_INPUT_EVENT_H
|
||||
#define TEST_INPUT_EVENT_H
|
||||
#pragma once
|
||||
|
||||
#include "core/input/input_event.h"
|
||||
#include "core/math/rect2.h"
|
||||
|
|
@ -44,10 +43,8 @@ TEST_CASE("[InputEvent] Signal is emitted when device is changed") {
|
|||
input_event.instantiate();
|
||||
|
||||
SIGNAL_WATCH(*input_event, CoreStringName(changed));
|
||||
Array args1;
|
||||
Array empty_args;
|
||||
empty_args.push_back(args1);
|
||||
|
||||
Array empty_args = { {} };
|
||||
input_event->set_device(1);
|
||||
|
||||
SIGNAL_CHECK("changed", empty_args);
|
||||
|
|
@ -111,5 +108,3 @@ TEST_CASE("[InputEvent] Test xformed_by") {
|
|||
CHECK(iemm2->get_position().is_equal_approx(Vector2(2.0f, 3.0f)));
|
||||
}
|
||||
} // namespace TestInputEvent
|
||||
|
||||
#endif // TEST_INPUT_EVENT_H
|
||||
|
|
|
|||
|
|
@ -28,8 +28,7 @@
|
|||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/**************************************************************************/
|
||||
|
||||
#ifndef TEST_INPUT_EVENT_KEY_H
|
||||
#define TEST_INPUT_EVENT_KEY_H
|
||||
#pragma once
|
||||
|
||||
#include "core/input/input_event.h"
|
||||
#include "core/os/keyboard.h"
|
||||
|
|
@ -335,5 +334,3 @@ TEST_CASE("[IsMatch] Keys are correctly matched") {
|
|||
CHECK(key3.is_match(loc_ref, false) == true);
|
||||
}
|
||||
} // namespace TestInputEventKey
|
||||
|
||||
#endif // TEST_INPUT_EVENT_KEY_H
|
||||
|
|
|
|||
|
|
@ -28,8 +28,7 @@
|
|||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/**************************************************************************/
|
||||
|
||||
#ifndef TEST_INPUT_EVENT_MOUSE_H
|
||||
#define TEST_INPUT_EVENT_MOUSE_H
|
||||
#pragma once
|
||||
|
||||
#include "core/input/input_event.h"
|
||||
#include "tests/test_macros.h"
|
||||
|
|
@ -77,5 +76,3 @@ TEST_CASE("[InputEventMouse] Setting the global mouse position works correctly")
|
|||
CHECK(mousekey.get_global_position() != Vector2{ 1, 1 });
|
||||
}
|
||||
} // namespace TestInputEventMouse
|
||||
|
||||
#endif // TEST_INPUT_EVENT_MOUSE_H
|
||||
|
|
|
|||
|
|
@ -28,8 +28,7 @@
|
|||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||
/**************************************************************************/
|
||||
|
||||
#ifndef TEST_SHORTCUT_H
|
||||
#define TEST_SHORTCUT_H
|
||||
#pragma once
|
||||
|
||||
#include "core/input/input_event.h"
|
||||
#include "core/input/shortcut.h"
|
||||
|
|
@ -61,10 +60,7 @@ TEST_CASE("[Shortcut] Setting and getting an event should result in the same eve
|
|||
// Cast to InputEvent so the internal code recognizes the objects.
|
||||
Ref<InputEvent> e1 = k1;
|
||||
Ref<InputEvent> e2 = k2;
|
||||
|
||||
Array input_array;
|
||||
input_array.append(e1);
|
||||
input_array.append(e2);
|
||||
Array input_array = { e1, e2 };
|
||||
|
||||
Shortcut s;
|
||||
s.set_events(input_array);
|
||||
|
|
@ -132,8 +128,7 @@ TEST_CASE("[Shortcut] 'matches_event' should correctly match the same event") {
|
|||
Ref<InputEvent> e_different = different;
|
||||
Ref<InputEvent> e_copy = copy;
|
||||
|
||||
Array a;
|
||||
a.append(e_original);
|
||||
Array a = { e_original };
|
||||
Shortcut s;
|
||||
s.set_events(a);
|
||||
|
||||
|
|
@ -155,9 +150,7 @@ TEST_CASE("[Shortcut] 'get_as_text' text representation should be correct") {
|
|||
different->set_keycode(Key::ESCAPE);
|
||||
|
||||
Ref<InputEvent> key_event1 = same;
|
||||
|
||||
Array a;
|
||||
a.append(key_event1);
|
||||
Array a = { key_event1 };
|
||||
Shortcut s;
|
||||
s.set_events(a);
|
||||
|
||||
|
|
@ -176,17 +169,14 @@ TEST_CASE("[Shortcut] Event validity should be correctly checked.") {
|
|||
Ref<InputEvent> valid_event = valid;
|
||||
Ref<InputEvent> invalid_event = invalid;
|
||||
|
||||
Array a;
|
||||
a.append(invalid_event);
|
||||
a.append(valid_event);
|
||||
Array a = { invalid_event, valid_event };
|
||||
|
||||
Shortcut s;
|
||||
s.set_events(a);
|
||||
|
||||
CHECK(s.has_valid_event() == true);
|
||||
|
||||
Array b;
|
||||
b.append(invalid_event);
|
||||
Array b = { invalid_event };
|
||||
|
||||
Shortcut shortcut_with_invalid_event;
|
||||
shortcut_with_invalid_event.set_events(b);
|
||||
|
|
@ -214,13 +204,8 @@ TEST_CASE("[Shortcut] Equal arrays should be recognized as such.") {
|
|||
Array same_as_same;
|
||||
same_as_same.append(key_event1);
|
||||
|
||||
Array different1;
|
||||
different1.append(key_event2);
|
||||
|
||||
Array different2;
|
||||
different2.append(key_event1);
|
||||
different2.append(key_event2);
|
||||
|
||||
Array different1 = { key_event2 };
|
||||
Array different2 = { key_event1, key_event2 };
|
||||
Array different3;
|
||||
|
||||
Shortcut s;
|
||||
|
|
@ -231,5 +216,3 @@ TEST_CASE("[Shortcut] Equal arrays should be recognized as such.") {
|
|||
CHECK(s.is_event_array_equal(same, different3) == false);
|
||||
}
|
||||
} // namespace TestShortcut
|
||||
|
||||
#endif // TEST_SHORTCUT_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue