SFML/test/TestUtilities/SystemUtil.cpp
2021-12-24 11:56:58 +01:00

21 lines
495 B
C++

// Note: No need to increase compile time by including TestUtilities/System.hpp
#include <SFML/System/String.hpp>
#include <SFML/System/Time.hpp>
#include <sstream>
// String conversions for Catch framework
namespace Catch
{
std::string toString(const sf::String& string)
{
return string.toAnsiString();
}
std::string toString(sf::Time time)
{
std::ostringstream stream;
stream << time.asMicroseconds() << "us";
return stream.str();
}
}