diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2022-02-01 00:05:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-01 00:05:02 +0100 |
commit | 8c7cd904f599b949972564ad13c3d4c1b016e977 (patch) | |
tree | a3836942ee699b90549240e5f9b3f6c0467e61cc /tests | |
parent | ee6b4b5800686e86bdb522ffa5df74028bf49dca (diff) | |
parent | 23a4fe5b27c191eae1dde05aa522463e67b0766f (diff) |
Merge pull request #57469 from Sauermann/fix-rect2i-intersect
Diffstat (limited to 'tests')
-rw-r--r-- | tests/core/math/test_rect2.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/core/math/test_rect2.h b/tests/core/math/test_rect2.h index e07250a8a2..d98a94b1b5 100644 --- a/tests/core/math/test_rect2.h +++ b/tests/core/math/test_rect2.h @@ -439,6 +439,9 @@ TEST_CASE("[Rect2i] Enclosing") { CHECK_MESSAGE( !Rect2i(0, 100, 1280, 720).encloses(Rect2i(-4000, -4000, 100, 100)), "encloses() with non-contained Rect2i should return the expected result."); + CHECK_MESSAGE( + Rect2i(0, 100, 1280, 720).encloses(Rect2i(0, 100, 1280, 720)), + "encloses() with identical Rect2i should return the expected result."); } TEST_CASE("[Rect2i] Expanding") { @@ -557,6 +560,9 @@ TEST_CASE("[Rect2i] Intersection") { CHECK_MESSAGE( !Rect2i(0, 100, 1280, 720).intersects(Rect2i(-4000, -4000, 100, 100)), "intersects() with non-enclosed Rect2i should return the expected result."); + CHECK_MESSAGE( + !Rect2i(0, 0, 2, 2).intersects(Rect2i(2, 2, 2, 2)), + "intersects() with adjacent Rect2i should return the expected result."); } TEST_CASE("[Rect2i] Merging") { |