aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/json/ut
diff options
context:
space:
mode:
authoryazevnul <yazevnul@yandex-team.ru>2022-02-10 16:46:48 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:48 +0300
commit9abfb1a53b7f7b791444d1378e645d8fad9b06ed (patch)
tree49e222ea1c5804306084bb3ae065bb702625360f /library/cpp/json/ut
parent8cbc307de0221f84c80c42dcbe07d40727537e2c (diff)
downloadydb-9abfb1a53b7f7b791444d1378e645d8fad9b06ed.tar.gz
Restoring authorship annotation for <yazevnul@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/json/ut')
-rw-r--r--library/cpp/json/ut/json_prettifier_ut.cpp12
-rw-r--r--library/cpp/json/ut/json_reader_ut.cpp20
-rw-r--r--library/cpp/json/ut/json_writer_ut.cpp18
-rw-r--r--library/cpp/json/ut/ya.make4
4 files changed, 27 insertions, 27 deletions
diff --git a/library/cpp/json/ut/json_prettifier_ut.cpp b/library/cpp/json/ut/json_prettifier_ut.cpp
index 4ca9d5bd81..ae5f8dd81a 100644
--- a/library/cpp/json/ut/json_prettifier_ut.cpp
+++ b/library/cpp/json/ut/json_prettifier_ut.cpp
@@ -2,8 +2,8 @@
#include <library/cpp/testing/unittest/registar.h>
-Y_UNIT_TEST_SUITE(JsonPrettifier) {
- Y_UNIT_TEST(PrettifyJsonShort) {
+Y_UNIT_TEST_SUITE(JsonPrettifier) {
+ Y_UNIT_TEST(PrettifyJsonShort) {
UNIT_ASSERT_STRINGS_EQUAL(NJson::PrettifyJson(""), "");
UNIT_ASSERT_STRINGS_EQUAL(NJson::PrettifyJson("null"), "null");
UNIT_ASSERT_STRINGS_EQUAL(NJson::PrettifyJson("true"), "true");
@@ -34,7 +34,7 @@ Y_UNIT_TEST_SUITE(JsonPrettifier) {
UNIT_ASSERT_STRINGS_EQUAL(NJson::PrettifyJson("{k:v}", true, 2), "{\n k : v\n}");
}
- Y_UNIT_TEST(PrettifyJsonLong) {
+ Y_UNIT_TEST(PrettifyJsonLong) {
UNIT_ASSERT_STRINGS_EQUAL(NJson::PrettifyJson("[{k:v},{a:b}]", false, 2, true),
"[\n"
" {\n"
@@ -110,7 +110,7 @@ Y_UNIT_TEST_SUITE(JsonPrettifier) {
"}");
}
- Y_UNIT_TEST(PrettifyJsonInvalid) {
+ Y_UNIT_TEST(PrettifyJsonInvalid) {
UNIT_ASSERT_STRINGS_EQUAL(NJson::PrettifyJson("}"), "");
UNIT_ASSERT_STRINGS_EQUAL(NJson::PrettifyJson("}}"), "");
UNIT_ASSERT_STRINGS_EQUAL(NJson::PrettifyJson("{}}"), "");
@@ -123,7 +123,7 @@ Y_UNIT_TEST_SUITE(JsonPrettifier) {
UNIT_ASSERT_STRINGS_EQUAL(NJson::PrettifyJson("{,,,}"), "");
}
- Y_UNIT_TEST(CompactifyJsonShort) {
+ Y_UNIT_TEST(CompactifyJsonShort) {
UNIT_ASSERT_STRINGS_EQUAL(NJson::CompactifyJson(""), "");
UNIT_ASSERT_STRINGS_EQUAL(NJson::CompactifyJson("null"), "null");
UNIT_ASSERT_STRINGS_EQUAL(NJson::CompactifyJson("true"), "true");
@@ -142,7 +142,7 @@ Y_UNIT_TEST_SUITE(JsonPrettifier) {
UNIT_ASSERT_STRINGS_EQUAL(NJson::CompactifyJson("{\n 'k' : 'v'\n}", true), "{k:v}");
}
- Y_UNIT_TEST(CompactifyJsonLong) {
+ Y_UNIT_TEST(CompactifyJsonLong) {
UNIT_ASSERT_STRINGS_EQUAL(NJson::CompactifyJson(
"[\n"
" {\n"
diff --git a/library/cpp/json/ut/json_reader_ut.cpp b/library/cpp/json/ut/json_reader_ut.cpp
index f4c9bf9df6..cd31afa0b8 100644
--- a/library/cpp/json/ut/json_reader_ut.cpp
+++ b/library/cpp/json/ut/json_reader_ut.cpp
@@ -66,8 +66,8 @@ public:
}
};
-Y_UNIT_TEST_SUITE(TJsonReaderTest) {
- Y_UNIT_TEST(JsonReformatTest) {
+Y_UNIT_TEST_SUITE(TJsonReaderTest) {
+ Y_UNIT_TEST(JsonReformatTest) {
TString data = "{\"null value\": null, \"intkey\": 10, \"double key\": 11.11, \"string key\": \"string\", \"array\": [1,2,3,\"TString\"], \"bool key\": true}";
TString result1, result2;
@@ -119,7 +119,7 @@ Y_UNIT_TEST_SUITE(TJsonReaderTest) {
}
}
- Y_UNIT_TEST(TJsonTreeTest) {
+ Y_UNIT_TEST(TJsonTreeTest) {
TString data = "{\"intkey\": 10, \"double key\": 11.11, \"null value\":null, \"string key\": \"string\", \"array\": [1,2,3,\"TString\"], \"bool key\": true}";
TStringStream in;
in << data;
@@ -154,7 +154,7 @@ Y_UNIT_TEST_SUITE(TJsonReaderTest) {
UNIT_ASSERT_VALUES_EQUAL(value["array"][3].GetString(), (*array)[3].GetString());
}
- Y_UNIT_TEST(TJsonRomaTest) {
+ Y_UNIT_TEST(TJsonRomaTest) {
TString data = "{\"test\": [ {\"name\": \"A\"} ]}";
TStringStream in;
@@ -165,7 +165,7 @@ Y_UNIT_TEST_SUITE(TJsonReaderTest) {
UNIT_ASSERT_VALUES_EQUAL(value["test"][0]["name"].GetString(), TString("A"));
}
- Y_UNIT_TEST(TJsonReadTreeWithComments) {
+ Y_UNIT_TEST(TJsonReadTreeWithComments) {
{
TString leadingCommentData = "{ // \"test\" : 1 \n}";
{
@@ -209,7 +209,7 @@ Y_UNIT_TEST_SUITE(TJsonReaderTest) {
}
}
- Y_UNIT_TEST(TJsonSignedIntegerTest) {
+ Y_UNIT_TEST(TJsonSignedIntegerTest) {
{
TStringStream in;
in << "{ \"test\" : " << Min<i64>() << " }";
@@ -234,7 +234,7 @@ Y_UNIT_TEST_SUITE(TJsonReaderTest) {
} // Max<i64>() + 1
}
- Y_UNIT_TEST(TJsonUnsignedIntegerTest) {
+ Y_UNIT_TEST(TJsonUnsignedIntegerTest) {
{
TStringStream in;
in << "{ \"test\" : 1 }";
@@ -309,7 +309,7 @@ Y_UNIT_TEST_SUITE(TJsonReaderTest) {
}
} // TJsonUnsignedIntegerTest
- Y_UNIT_TEST(TJsonDoubleTest) {
+ Y_UNIT_TEST(TJsonDoubleTest) {
{
TStringStream in;
in << "{ \"test\" : 1.0 }";
@@ -355,7 +355,7 @@ Y_UNIT_TEST_SUITE(TJsonReaderTest) {
} // Max<ui64>()
} // TJsonDoubleTest
- Y_UNIT_TEST(TJsonInvalidTest) {
+ Y_UNIT_TEST(TJsonInvalidTest) {
{
// No exceptions mode.
TStringStream in;
@@ -373,7 +373,7 @@ Y_UNIT_TEST_SUITE(TJsonReaderTest) {
}
}
- Y_UNIT_TEST(TJsonMemoryLeakTest) {
+ Y_UNIT_TEST(TJsonMemoryLeakTest) {
// after https://clubs.at.yandex-team.ru/stackoverflow/3691
TString s = ".";
NJson::TJsonValue json;
diff --git a/library/cpp/json/ut/json_writer_ut.cpp b/library/cpp/json/ut/json_writer_ut.cpp
index bda63e3807..ca11d34dad 100644
--- a/library/cpp/json/ut/json_writer_ut.cpp
+++ b/library/cpp/json/ut/json_writer_ut.cpp
@@ -5,8 +5,8 @@
using namespace NJson;
-Y_UNIT_TEST_SUITE(TJsonWriterTest) {
- Y_UNIT_TEST(SimpleWriteTest) {
+Y_UNIT_TEST_SUITE(TJsonWriterTest) {
+ Y_UNIT_TEST(SimpleWriteTest) {
TString expected1 = "{\"key1\":1,\"key2\":2,\"key3\":3";
TString expected2 = expected1 + ",\"array\":[\"stroka\",false]";
TString expected3 = expected2 + "}";
@@ -41,7 +41,7 @@ Y_UNIT_TEST_SUITE(TJsonWriterTest) {
UNIT_ASSERT_VALUES_EQUAL(out.Str(), expected3);
}
- Y_UNIT_TEST(SimpleWriteValueTest) {
+ Y_UNIT_TEST(SimpleWriteValueTest) {
TString expected = "{\"key1\":null,\"key2\":{\"subkey1\":[1,{\"subsubkey\":\"test2\"},null,true],\"subkey2\":\"test\"}}";
TJsonValue v;
v["key1"] = JSON_NULL;
@@ -55,7 +55,7 @@ Y_UNIT_TEST_SUITE(TJsonWriterTest) {
UNIT_ASSERT_VALUES_EQUAL(out.Str(), expected);
}
- Y_UNIT_TEST(FormatOutput) {
+ Y_UNIT_TEST(FormatOutput) {
TString expected = "{\n \"key1\":null,\n \"key2\":\n {\n \"subkey1\":\n [\n 1,\n {\n \"subsubkey\":\"test2\"\n },\n null,\n true\n ],\n \"subkey2\":\"test\"\n }\n}";
TJsonValue v;
v["key1"] = JSON_NULL;
@@ -69,7 +69,7 @@ Y_UNIT_TEST_SUITE(TJsonWriterTest) {
UNIT_ASSERT_STRINGS_EQUAL(out.Str(), expected);
}
- Y_UNIT_TEST(SortKeys) {
+ Y_UNIT_TEST(SortKeys) {
TString expected = "{\"a\":null,\"j\":null,\"n\":null,\"y\":null,\"z\":null}";
TJsonValue v;
v["z"] = JSON_NULL;
@@ -82,7 +82,7 @@ Y_UNIT_TEST_SUITE(TJsonWriterTest) {
UNIT_ASSERT_STRINGS_EQUAL(out.Str(), expected);
}
- Y_UNIT_TEST(SimpleUnsignedIntegerWriteTest) {
+ Y_UNIT_TEST(SimpleUnsignedIntegerWriteTest) {
{
TString expected = "{\"test\":1}";
TJsonValue v;
@@ -122,7 +122,7 @@ Y_UNIT_TEST_SUITE(TJsonWriterTest) {
} // 18446744073709551615
} // SimpleUnsignedIntegerWriteTest
- Y_UNIT_TEST(WriteOptionalTest) {
+ Y_UNIT_TEST(WriteOptionalTest) {
{
TString expected = "{\"test\":1}";
@@ -180,7 +180,7 @@ Y_UNIT_TEST_SUITE(TJsonWriterTest) {
}
}
- Y_UNIT_TEST(Callback) {
+ Y_UNIT_TEST(Callback) {
NJsonWriter::TBuf json;
json.WriteString("A");
UNIT_ASSERT_VALUES_EQUAL(json.Str(), "\"A\"");
@@ -188,7 +188,7 @@ Y_UNIT_TEST_SUITE(TJsonWriterTest) {
UNIT_ASSERT_VALUES_EQUAL(WrapJsonToCallback(json, "Foo"), "Foo(\"A\")");
}
- Y_UNIT_TEST(FloatPrecision) {
+ Y_UNIT_TEST(FloatPrecision) {
const double value = 1517933989.4242;
const NJson::TJsonValue json(value);
NJson::TJsonWriterConfig config;
diff --git a/library/cpp/json/ut/ya.make b/library/cpp/json/ut/ya.make
index edc8f0f3f6..8e0362d84b 100644
--- a/library/cpp/json/ut/ya.make
+++ b/library/cpp/json/ut/ya.make
@@ -1,5 +1,5 @@
-OWNER(velavokr)
-
+OWNER(velavokr)
+
UNITTEST_FOR(library/cpp/json)
PEERDIR(