| 25 | // Compare result of tfm::format() to C's sprintf(). |
| 26 | template<typename... Args> |
| 27 | void compareSprintf(const Args&... args) |
| 28 | { |
| 29 | std::string tfmResult = tfm::format(args...); |
| 30 | char sprintfResult[200]; |
| 31 | sprintf(sprintfResult, args...); |
| 32 | if (tfmResult != sprintfResult) |
| 33 | { |
| 34 | std::cout << tfmResult << std::endl; |
| 35 | std::cout << sprintfResult << std::endl; |
| 36 | assert(0 && "results didn't match, see above."); |
| 37 | } |
| 38 | } |
| 39 | #endif |
| 40 | |
| 41 | #define EXPECT_ERROR(expression) \ |