diff options
author | ivanzhukov <ivanzhukov@yandex-team.ru> | 2022-02-10 16:49:40 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:40 +0300 |
commit | 0892d79ab411592ad25175c4bdadbcb09b466cf5 (patch) | |
tree | 98dfdd45463c9bd747101748a9ca25d2917390fd /library/cpp/monlib/encode/json/json_ut.cpp | |
parent | 1b7466cb957659079ebebbb5d76e64e51f3306f0 (diff) | |
download | ydb-0892d79ab411592ad25175c4bdadbcb09b466cf5.tar.gz |
Restoring authorship annotation for <ivanzhukov@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/monlib/encode/json/json_ut.cpp')
-rw-r--r-- | library/cpp/monlib/encode/json/json_ut.cpp | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/library/cpp/monlib/encode/json/json_ut.cpp b/library/cpp/monlib/encode/json/json_ut.cpp index 09e7909289..5de8470fcf 100644 --- a/library/cpp/monlib/encode/json/json_ut.cpp +++ b/library/cpp/monlib/encode/json/json_ut.cpp @@ -559,21 +559,21 @@ Y_UNIT_TEST_SUITE(TJsonTest) { } } - Y_UNIT_TEST(DecodeToEncoder) { - auto testJson = NResource::Find("/test_decode_to_encode.json"); - - TStringStream Stream_; - auto encoder = BufferedEncoderJson(&Stream_, 4); - DecodeJson(testJson, encoder.Get()); - - encoder->Close(); - - auto val1 = NJson::ReadJsonFastTree(testJson, true); - auto val2 = NJson::ReadJsonFastTree(Stream_.Str(), true); - - UNIT_ASSERT_VALUES_EQUAL(val1, val2); - } - + Y_UNIT_TEST(DecodeToEncoder) { + auto testJson = NResource::Find("/test_decode_to_encode.json"); + + TStringStream Stream_; + auto encoder = BufferedEncoderJson(&Stream_, 4); + DecodeJson(testJson, encoder.Get()); + + encoder->Close(); + + auto val1 = NJson::ReadJsonFastTree(testJson, true); + auto val2 = NJson::ReadJsonFastTree(Stream_.Str(), true); + + UNIT_ASSERT_VALUES_EQUAL(val1, val2); + } + void WriteEmptySeries(const IMetricEncoderPtr& e) { e->OnStreamBegin(); { @@ -1033,12 +1033,12 @@ Y_UNIT_TEST_SUITE(TJsonTest) { AssertPointEqual(s.GetPoints(1), now + TDuration::Seconds(15), *logHist); } - void HistogramValueDecode(const TString& filePath) { + void HistogramValueDecode(const TString& filePath) { NProto::TMultiSamplesList samples; { IMetricEncoderPtr e = EncoderProtobuf(&samples); - TString testJson = NResource::Find(filePath); + TString testJson = NResource::Find(filePath); DecodeJson(testJson, e.Get()); } @@ -1059,11 +1059,11 @@ Y_UNIT_TEST_SUITE(TJsonTest) { AssertPointEqual(s.GetPoints(0), now, *h->Snapshot()); } - Y_UNIT_TEST(HistogramValueDecode) { - HistogramValueDecode("/histogram_value.json"); - HistogramValueDecode("/histogram_value_inf_before_bounds.json"); - } - + Y_UNIT_TEST(HistogramValueDecode) { + HistogramValueDecode("/histogram_value.json"); + HistogramValueDecode("/histogram_value_inf_before_bounds.json"); + } + Y_UNIT_TEST(HistogramTimeSeriesEncode) { auto writeDocument = [](IMetricEncoder* e) { e->OnStreamBegin(); |