| 17 | |
| 18 | template <typename... Args> |
| 19 | std::string string_format(const std::string& format, Args... args) { |
| 20 | size_t size = snprintf(nullptr, 0, format.c_str(), args...) + 1; // Extra space for '\0' |
| 21 | std::unique_ptr<char[]> buf(new char[size]); |
| 22 | snprintf(buf.get(), size, format.c_str(), args...); |
| 23 | return std::string(buf.get(), buf.get() + size - 1); // We don't want the '\0' inside |
| 24 | } |
| 25 | |
| 26 | TEST_CASE("JsonSerializer", "[json]") { |
| 27 | GIVEN("A default constructed Context with a LangModule and GraphFunction named hello") { |
no test coverage detected