From bc7ec1277a16228a9a8f5ab526bea96a3b70816f Mon Sep 17 00:00:00 2001 From: Chris Thrasher Date: Thu, 24 Mar 2022 12:14:49 -0600 Subject: [PATCH] Move `sf::Rect` printer to GraphicsUtil --- test/TestUtilities/GraphicsUtil.hpp | 9 +++++++++ test/TestUtilities/WindowUtil.hpp | 9 --------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/test/TestUtilities/GraphicsUtil.hpp b/test/TestUtilities/GraphicsUtil.hpp index d631e543..44b3c3ba 100644 --- a/test/TestUtilities/GraphicsUtil.hpp +++ b/test/TestUtilities/GraphicsUtil.hpp @@ -8,6 +8,8 @@ #include "WindowUtil.hpp" +#include + namespace sf { struct BlendMode; @@ -17,6 +19,13 @@ namespace sf std::ostream& operator <<(std::ostream& os, const BlendMode& blendMode); std::ostream& operator <<(std::ostream& os, const Color& color); std::ostream& operator <<(std::ostream& os, const Transform& transform); + + template + std::ostream& operator <<(std::ostream& os, const sf::Rect& rect) + { + os << "(left=" << rect.left << ", top=" << rect.top << ", width=" << rect.width << ", height=" << rect.height << ")"; + return os; + } } #endif // SFML_TESTUTILITIES_GRAPHICS_HPP diff --git a/test/TestUtilities/WindowUtil.hpp b/test/TestUtilities/WindowUtil.hpp index ae5630af..57777ede 100644 --- a/test/TestUtilities/WindowUtil.hpp +++ b/test/TestUtilities/WindowUtil.hpp @@ -8,21 +8,12 @@ #include "SystemUtil.hpp" -#include - // String conversions for doctest framework namespace sf { class VideoMode; std::ostream& operator <<(std::ostream& os, const sf::VideoMode& videoMode); - - template - std::ostream& operator <<(std::ostream& os, const sf::Rect& rect) - { - os << "(left=" << rect.left << ", top=" << rect.top << ", width=" << rect.width << ", height=" << rect.height << ")"; - return os; - } } #endif // SFML_TESTUTILITIES_WINDOW_HPP