Fix optimizations problems with serialization buffer in unit tests

This commit is contained in:
Ivan Shynkarenka 2016-09-20 02:13:07 +03:00
parent 27d960bf90
commit bebf194de1

View File

@ -1655,10 +1655,12 @@ TEST(FormatTest, CustomArgFormatter) {
}
std::string serialize_deserialize(const char *format_str, fmt::ArgList args) {
static std::vector<uint8_t> buffer;
std::vector<uint8_t> buffer;
args.serialize<char>(buffer);
args = args.deserialize<char>(buffer);
return fmt::format(format_str, args);
std::string result = fmt::format(format_str, args);
buffer.clear();
return result;
}
FMT_VARIADIC(std::string, serialize_deserialize, const char *)