Don't ignore value returned by json_string_decode.

This commit is contained in:
levlam 2023-08-09 13:46:49 +03:00
parent 5b6e1c60db
commit f64268c50d
1 changed files with 4 additions and 1 deletions

View File

@ -356,7 +356,7 @@ class JsonStringDecodeBenchmark final : public td::Benchmark {
for (int i = 0; i < n; i++) {
auto str = str_;
td::Parser parser(str);
td::json_string_decode(parser);
td::json_string_decode(parser).ensure();
}
}
};
@ -366,6 +366,9 @@ TEST(JSON, bench_json_string_decode) {
td::bench(JsonStringDecodeBenchmark(td::string(1000, '\\')));
td::string str;
for (int i = 32; i < 128; i++) {
if (i == 'u') {
continue;
}
str += "a\\";
str += static_cast<char>(i);
}