aboutsummaryrefslogtreecommitdiff
path: root/test/platform/MatrixTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/platform/MatrixTest.cpp')
-rw-r--r--test/platform/MatrixTest.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/test/platform/MatrixTest.cpp b/test/platform/MatrixTest.cpp
index b19b25fe..c107ddc3 100644
--- a/test/platform/MatrixTest.cpp
+++ b/test/platform/MatrixTest.cpp
@@ -2,13 +2,14 @@
#include "cru/platform/Matrix.h"
#include <catch2/catch_test_macros.hpp>
-#include "catch2/catch_approx.hpp"
+#include <catch2/catch_approx.hpp>
using Catch::Approx;
using cru::platform::Matrix;
-using cru::platform::Point;
TEST_CASE("Matrix Rotation", "[matrix]") {
+ using cru::platform::Point;
+
Point p(1, 1);
Point p90 = Matrix::Rotation(90).TransformPoint(p);
@@ -25,6 +26,8 @@ TEST_CASE("Matrix Rotation", "[matrix]") {
}
TEST_CASE("Matrix TranslationAndRotation", "[matrix]") {
+ using cru::platform::Point;
+
Point p =
(Matrix::Translation(1, 1) * Matrix::Rotation(90)).TransformPoint({1, 1});
REQUIRE(p.x == Approx(-2));
@@ -32,6 +35,8 @@ TEST_CASE("Matrix TranslationAndRotation", "[matrix]") {
}
TEST_CASE("Matrix RotationAndTranslation", "[matrix]") {
+ using cru::platform::Point;
+
Point p =
(Matrix::Rotation(90) * Matrix::Translation(1, 1)).TransformPoint({1, 1});
REQUIRE(p.x == Approx(0));