diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index c352b55515..1593b649a0 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -12,7 +12,7 @@ foreach(DIR ${TEST_SUBDIRS}) endif() endforeach() -file(GLOB SHARED_TEST_HEADER_FILES "${CMAKE_CURRENT_SOURCE_DIR}/*.h" "${CMAKE_CURRENT_SOURCE_DIR}/*.hpp") +file(GLOB SHARED_TEST_HEADER_FILES "${CMAKE_CURRENT_SOURCE_DIR}/*.h " "${CMAKE_CURRENT_SOURCE_DIR}/*.hpp") add_custom_target("test-extensions" SOURCES "${SHARED_TEST_HEADER_FILES}") @@ -34,4 +34,4 @@ add_custom_target("all-tests" set_target_properties("all-tests" PROPERTIES FOLDER "hidden/test-targets") set_target_properties("all-tests" PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD TRUE - EXCLUDE_FROM_ALL TRUE) \ No newline at end of file + EXCLUDE_FROM_ALL TRUE) diff --git a/tests/physics/src/GLMTestUtils.h b/tests/GLMTestUtils.h similarity index 99% rename from tests/physics/src/GLMTestUtils.h rename to tests/GLMTestUtils.h index ef63689419..6559e9f3c9 100644 --- a/tests/physics/src/GLMTestUtils.h +++ b/tests/GLMTestUtils.h @@ -20,6 +20,7 @@ inline float getErrorDifference(const glm::vec3& a, const glm::vec3& b) { return glm::distance(a, b); } + inline QTextStream& operator<<(QTextStream& stream, const glm::vec3& v) { return stream << "glm::vec3 { " << v.x << ", " << v.y << ", " << v.z << " }"; } diff --git a/tests/QTestExtensions.h b/tests/QTestExtensions.h index c034e9c290..d1918ebed8 100644 --- a/tests/QTestExtensions.h +++ b/tests/QTestExtensions.h @@ -15,6 +15,8 @@ #include #include +#include "GLMTestUtils.h" + // Implements several extensions to QtTest. // // Problems with QtTest: diff --git a/tests/physics/src/BulletUtilTests.cpp b/tests/physics/src/BulletUtilTests.cpp index a52e407aab..132d655274 100644 --- a/tests/physics/src/BulletUtilTests.cpp +++ b/tests/physics/src/BulletUtilTests.cpp @@ -17,7 +17,6 @@ #include // Add additional qtest functionality (the include order is important!) -#include "GLMTestUtils.h" #include "../QTestExtensions.h" // Constants diff --git a/tests/physics/src/MeshMassPropertiesTests.cpp b/tests/physics/src/MeshMassPropertiesTests.cpp index 8295abfef8..825721641f 100644 --- a/tests/physics/src/MeshMassPropertiesTests.cpp +++ b/tests/physics/src/MeshMassPropertiesTests.cpp @@ -16,7 +16,6 @@ // Add additional qtest functionality (the include order is important!) #include "BulletTestUtils.h" -#include "GLMTestUtils.h" #include "../QTestExtensions.h" const btScalar acceptableRelativeError(1.0e-5f);