From d868d7b0d463ede80b761f87f10d4e25f52989c3 Mon Sep 17 00:00:00 2001 From: Yuqian Yang Date: Sun, 15 Jun 2025 01:02:30 +0800 Subject: Remove some files of OSX. Symbol Point is conflict and needs to be fixed. --- test/platform/CMakeLists.txt | 3 ++- test/platform/MatrixTest.cpp | 9 +++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'test') diff --git a/test/platform/CMakeLists.txt b/test/platform/CMakeLists.txt index 6a6f81e5..394aa247 100644 --- a/test/platform/CMakeLists.txt +++ b/test/platform/CMakeLists.txt @@ -9,7 +9,8 @@ if (WIN32) endif() if (UNIX AND NOT EMSCRIPTEN) - add_subdirectory(graphics/cairo) + # TODO: Re-enable this! + # add_subdirectory(graphics/cairo) endif() cru_catch_discover_tests(CruPlatformBaseTest) 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 -#include "catch2/catch_approx.hpp" +#include 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)); -- cgit v1.2.3