diff options
author | dobrokot <dobrokot@yandex-team.ru> | 2022-02-10 16:49:07 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:07 +0300 |
commit | 25d83bf841d8b3ce3886525078f1964ac3c293c5 (patch) | |
tree | bd52fa16c8dd727890b2ef9d87d1a402bd0d3a9a /library/cpp/json | |
parent | 1d2e8a8e9976488ea69a7e4763aa749244f82612 (diff) | |
download | ydb-25d83bf841d8b3ce3886525078f1964ac3c293c5.tar.gz |
Restoring authorship annotation for <dobrokot@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/json')
-rw-r--r-- | library/cpp/json/ut/json_writer_ut.cpp | 14 | ||||
-rw-r--r-- | library/cpp/json/writer/json.cpp | 4 | ||||
-rw-r--r-- | library/cpp/json/writer/json.h | 2 |
3 files changed, 10 insertions, 10 deletions
diff --git a/library/cpp/json/ut/json_writer_ut.cpp b/library/cpp/json/ut/json_writer_ut.cpp index ca11d34dad..bcb1af0f24 100644 --- a/library/cpp/json/ut/json_writer_ut.cpp +++ b/library/cpp/json/ut/json_writer_ut.cpp @@ -179,14 +179,14 @@ Y_UNIT_TEST_SUITE(TJsonWriterTest) { UNIT_ASSERT_VALUES_EQUAL(out.Str(), expected); } } - + Y_UNIT_TEST(Callback) { - NJsonWriter::TBuf json; - json.WriteString("A"); - UNIT_ASSERT_VALUES_EQUAL(json.Str(), "\"A\""); - UNIT_ASSERT_VALUES_EQUAL(WrapJsonToCallback(json, ""), "\"A\""); - UNIT_ASSERT_VALUES_EQUAL(WrapJsonToCallback(json, "Foo"), "Foo(\"A\")"); - } + NJsonWriter::TBuf json; + json.WriteString("A"); + UNIT_ASSERT_VALUES_EQUAL(json.Str(), "\"A\""); + UNIT_ASSERT_VALUES_EQUAL(WrapJsonToCallback(json, ""), "\"A\""); + UNIT_ASSERT_VALUES_EQUAL(WrapJsonToCallback(json, "Foo"), "Foo(\"A\")"); + } Y_UNIT_TEST(FloatPrecision) { const double value = 1517933989.4242; diff --git a/library/cpp/json/writer/json.cpp b/library/cpp/json/writer/json.cpp index 02370c2d79..85642e6d8e 100644 --- a/library/cpp/json/writer/json.cpp +++ b/library/cpp/json/writer/json.cpp @@ -506,8 +506,8 @@ namespace NJsonWriter { NeedComma = from.NeedComma; NeedNewline = from.NeedNewline; Stack = from.Stack; - } - + } + void TBuf::Reset(TBufState&& from) { NeedComma = from.NeedComma; NeedNewline = from.NeedNewline; diff --git a/library/cpp/json/writer/json.h b/library/cpp/json/writer/json.h index 0aae2531b9..64ec7a4253 100644 --- a/library/cpp/json/writer/json.h +++ b/library/cpp/json/writer/json.h @@ -284,6 +284,6 @@ namespace NJsonWriter { TPairContext TValueWriter<TOutContext>::BeginObject() { return Buf.BeginObject(); } - + TString WrapJsonToCallback(const TBuf& buf, TStringBuf callback); } |