| 15 | |
| 16 | template <typename TFloat> |
| 17 | void check(TFloat input, const std::string& expected) { |
| 18 | std::string output; |
| 19 | Writer<std::string> sb(output); |
| 20 | TextFormatter<Writer<std::string>> writer(sb); |
| 21 | writer.writeFloat(input); |
| 22 | REQUIRE(writer.bytesWritten() == output.size()); |
| 23 | CHECK(expected == output); |
| 24 | } |
| 25 | |
| 26 | TEST_CASE("TextFormatter::writeFloat(double)") { |
| 27 | SECTION("Pi") { |