#include <utility> Describe(function_foo) { It(should_return_1_1) { Assert::That(foo(), Equals(std::pair<int, int>{1, 1})); } }; #include <sstream> #include <string> namespace snowhouse { template<> struct Stringizer<std::pair<int, int>> { static std::string ToString(const std::pair<int, int>& x) { std::stringstream stream; stream << '{' << x.first << ", " << x.second << '}'; return stream.str(); } }; }
- #include <utility>
- Describe(function_foo)
- {
- It(should_return_1_1)
- {
- Assert::That(foo(), Equals(std::pair<int, int>{1, 1}));
- }
- };
- #include <sstream>
- #include <string>
namespace snowhouse {template <> struct Stringizer<std::pair<int, int>> {static std::string ToString(const std::pair<int, int>& x) {return (std::ostringstream() << '{' << x.first << ", " << x.second << '}').str();- namespace snowhouse
- {
- template<>
- struct Stringizer<std::pair<int, int>>
- {
- static std::string ToString(const std::pair<int, int>& x)
- {
- std::stringstream stream;
- stream << '{' << x.first << ", " << x.second << '}';
- return stream.str();
- }
- };
- }