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_RECT2_H
|
||||
#define TEST_RECT2_H
|
||||
#pragma once
|
||||
|
||||
#include "core/math/rect2.h"
|
||||
#include "core/math/rect2i.h"
|
||||
|
|
@ -38,15 +37,15 @@
|
|||
|
||||
namespace TestRect2 {
|
||||
TEST_CASE("[Rect2] Constructor methods") {
|
||||
const Rect2 rect = Rect2(0, 100, 1280, 720);
|
||||
const Rect2 rect_vector = Rect2(Vector2(0, 100), Vector2(1280, 720));
|
||||
const Rect2 rect_copy_rect = Rect2(rect);
|
||||
constexpr Rect2 rect = Rect2(0, 100, 1280, 720);
|
||||
constexpr Rect2 rect_vector = Rect2(Vector2(0, 100), Vector2(1280, 720));
|
||||
constexpr Rect2 rect_copy_rect = Rect2(rect);
|
||||
const Rect2 rect_copy_recti = Rect2(Rect2i(0, 100, 1280, 720));
|
||||
|
||||
CHECK_MESSAGE(
|
||||
static_assert(
|
||||
rect == rect_vector,
|
||||
"Rect2s created with the same dimensions but by different methods should be equal.");
|
||||
CHECK_MESSAGE(
|
||||
static_assert(
|
||||
rect == rect_copy_rect,
|
||||
"Rect2s created with the same dimensions but by different methods should be equal.");
|
||||
CHECK_MESSAGE(
|
||||
|
|
@ -62,7 +61,7 @@ TEST_CASE("[Rect2] String conversion") {
|
|||
}
|
||||
|
||||
TEST_CASE("[Rect2] Basic getters") {
|
||||
const Rect2 rect = Rect2(0, 100, 1280, 720);
|
||||
constexpr Rect2 rect = Rect2(0, 100, 1280, 720);
|
||||
CHECK_MESSAGE(
|
||||
rect.get_position().is_equal_approx(Vector2(0, 100)),
|
||||
"get_position() should return the expected value.");
|
||||
|
|
@ -181,7 +180,7 @@ TEST_CASE("[Rect2] Expanding") {
|
|||
}
|
||||
|
||||
TEST_CASE("[Rect2] Get support") {
|
||||
const Rect2 rect = Rect2(Vector2(-1.5, 2), Vector2(4, 5));
|
||||
constexpr Rect2 rect = Rect2(Vector2(-1.5, 2), Vector2(4, 5));
|
||||
CHECK_MESSAGE(
|
||||
rect.get_support(Vector2(1, 0)) == Vector2(2.5, 2),
|
||||
"get_support() should return the expected value.");
|
||||
|
|
@ -324,8 +323,8 @@ TEST_CASE("[Rect2] Merging") {
|
|||
}
|
||||
|
||||
TEST_CASE("[Rect2] Finite number checks") {
|
||||
const Vector2 x(0, 1);
|
||||
const Vector2 infinite(NAN, NAN);
|
||||
constexpr Vector2 x(0, 1);
|
||||
constexpr Vector2 infinite(Math::NaN, Math::NaN);
|
||||
|
||||
CHECK_MESSAGE(
|
||||
Rect2(x, x).is_finite(),
|
||||
|
|
@ -344,5 +343,3 @@ TEST_CASE("[Rect2] Finite number checks") {
|
|||
}
|
||||
|
||||
} // namespace TestRect2
|
||||
|
||||
#endif // TEST_RECT2_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue