diff --git a/test/Graphics/Transform.cpp b/test/Graphics/Transform.cpp index baf5fd63..33c4d129 100644 --- a/test/Graphics/Transform.cpp +++ b/test/Graphics/Transform.cpp @@ -4,19 +4,26 @@ #include #include +#include #include -namespace std +// Use StringMaker to avoid opening namespace std +namespace doctest { -std::ostream& operator<<(std::ostream& out, const std::vector& vector) +template <> +struct StringMaker> { - out << "{ "; - for (size_t i = 0; i + 1 < vector.size(); ++i) - out << vector[i] << ", "; - out << vector.back() << " }"; - return out; -} -} // namespace std + static String convert(const std::vector& vector) + { + assert(!vector.empty()); + doctest::String out = "{ "; + for (size_t i = 0; i + 1 < vector.size(); ++i) + out += toString(vector[i]) + ", "; + out += toString(vector.back()) + " }"; + return out; + } +}; +} // namespace doctest TEST_CASE("sf::Transform class - [graphics]") {