summaryrefslogtreecommitdiffstats
path: root/library/cpp/json/ut
diff options
context:
space:
mode:
authornae202 <[email protected]>2025-09-23 07:48:35 +0300
committernae202 <[email protected]>2025-09-23 08:03:21 +0300
commit63774bc851bb76e24f369ef4e0328e5f05edbb4b (patch)
treed3226ed9a5f200097949f6001a7e3183aff7adfa /library/cpp/json/ut
parentf4cbf746a0b6649479cfb305eceababced0ac10a (diff)
Style fix
commit_hash:d506e2a0f2770f3662449a3711e976499eb9ccbb
Diffstat (limited to 'library/cpp/json/ut')
-rw-r--r--library/cpp/json/ut/json_prettifier_ut.cpp2
-rw-r--r--library/cpp/json/ut/json_reader_fast_ut.cpp22
-rw-r--r--library/cpp/json/ut/json_reader_nan_ut.cpp8
-rw-r--r--library/cpp/json/ut/json_reader_ut.cpp8
-rw-r--r--library/cpp/json/ut/json_saveload_ut.cpp3
-rw-r--r--library/cpp/json/ut/json_writer_ut.cpp4
6 files changed, 21 insertions, 26 deletions
diff --git a/library/cpp/json/ut/json_prettifier_ut.cpp b/library/cpp/json/ut/json_prettifier_ut.cpp
index ae5f8dd81a4..03a3b09ee23 100644
--- a/library/cpp/json/ut/json_prettifier_ut.cpp
+++ b/library/cpp/json/ut/json_prettifier_ut.cpp
@@ -201,4 +201,4 @@ Y_UNIT_TEST_SUITE(JsonPrettifier) {
true),
"{g:{x:{a:{b:c,e:f},q:{x:y}},y:fff}}");
}
-}
+} // Y_UNIT_TEST_SUITE(JsonPrettifier)
diff --git a/library/cpp/json/ut/json_reader_fast_ut.cpp b/library/cpp/json/ut/json_reader_fast_ut.cpp
index 60dffc91c73..7ec516bd838 100644
--- a/library/cpp/json/ut/json_reader_fast_ut.cpp
+++ b/library/cpp/json/ut/json_reader_fast_ut.cpp
@@ -86,7 +86,7 @@ namespace NJson {
using TEvents = TVector<TEvent>;
- struct TTestHandler : TJsonCallbacks {
+ struct TTestHandler: TJsonCallbacks {
TEvents Events;
bool OnOpenMap() override {
@@ -167,8 +167,8 @@ namespace NJson {
}
}
};
- }
-}
+ } // namespace NTest
+} // namespace NJson
class TFastJsonTest: public TTestBase {
UNIT_TEST_SUITE(TFastJsonTest)
@@ -263,14 +263,14 @@ public:
DoTestParse<true>("{}", 2, E_DICT_OPEN, E_DICT_CLOSE);
DoTestParse<true>("{ a : x, b : [ c, d, ] }", 9, E_DICT_OPEN, E_KEY, "a", E_STR, "x", E_KEY, "b", E_ARR_OPEN, E_STR, "c", E_STR, "d", E_ARR_CLOSE, E_DICT_CLOSE);
DoTestParse<false>("{ a : x, b : [ c, d,, ] }", 8, E_DICT_OPEN, E_KEY, "a", E_STR, "x", E_KEY, "b", E_ARR_OPEN, E_STR, "c", E_STR, "d", E_ERROR, "invalid syntax at token: ','");
- // DoTestParse<false>("{ a : x : y }", 4, E_DICT_OPEN
- // , E_KEY, "a", E_STR, "x"
- // , E_ERROR
- // , ":");
- // DoTestParse<false>("{queries:{ref:[]},{nonref:[]}}", 8, E_DICT_OPEN
- // , E_KEY, "queries", E_DICT_OPEN
- // , E_KEY, "ref", E_ARR_OPEN, E_ARR_CLOSE
- // , E_DICT_CLOSE, E_ERROR, "");
+ // DoTestParse<false>("{ a : x : y }", 4, E_DICT_OPEN
+ // , E_KEY, "a", E_STR, "x"
+ // , E_ERROR
+ // , ":");
+ // DoTestParse<false>("{queries:{ref:[]},{nonref:[]}}", 8, E_DICT_OPEN
+ // , E_KEY, "queries", E_DICT_OPEN
+ // , E_KEY, "ref", E_ARR_OPEN, E_ARR_CLOSE
+ // , E_DICT_CLOSE, E_ERROR, "");
DoTestParse<true>("'100x00'", 1, E_STR, "100x00");
DoTestParse<true>("-1", 1, E_INT, -1);
DoTestParse<true>("-9223372036854775808", 1, E_LONG_LONG, (long long)Min<i64>());
diff --git a/library/cpp/json/ut/json_reader_nan_ut.cpp b/library/cpp/json/ut/json_reader_nan_ut.cpp
index fdd66249eb2..2b1582b77f0 100644
--- a/library/cpp/json/ut/json_reader_nan_ut.cpp
+++ b/library/cpp/json/ut/json_reader_nan_ut.cpp
@@ -5,9 +5,9 @@ using namespace NJson;
namespace {
-constexpr TStringBuf JSON_NAN_TEST = "{ \"Value1\": 0.0, \"Value2\": 1, \"Value3\": NaN }";
+ constexpr TStringBuf JSON_NAN_TEST = "{ \"Value1\": 0.0, \"Value2\": 1, \"Value3\": NaN }";
-}
+} // namespace
Y_UNIT_TEST_SUITE(TJsonReaderNanTest) {
Y_UNIT_TEST(WithoutNanTest) {
@@ -15,7 +15,6 @@ Y_UNIT_TEST_SUITE(TJsonReaderNanTest) {
TJsonValue out;
// This read will fail
UNIT_ASSERT(!ReadJsonTree(JSON_NAN_TEST, &cfg, &out, /* throwOnError */ false));
-
}
Y_UNIT_TEST(WithNanTest) {
TJsonReaderConfig cfg;
@@ -25,5 +24,4 @@ Y_UNIT_TEST_SUITE(TJsonReaderNanTest) {
// This read will ok
UNIT_ASSERT(ReadJsonTree(JSON_NAN_TEST, &cfg, &out, /* throwOnError */ false));
}
-}
-
+} // Y_UNIT_TEST_SUITE(TJsonReaderNanTest)
diff --git a/library/cpp/json/ut/json_reader_ut.cpp b/library/cpp/json/ut/json_reader_ut.cpp
index 07de6a7ac3c..376bd2a17e5 100644
--- a/library/cpp/json/ut/json_reader_ut.cpp
+++ b/library/cpp/json/ut/json_reader_ut.cpp
@@ -374,7 +374,7 @@ Y_UNIT_TEST_SUITE(TJsonReaderTest) {
UNIT_ASSERT_EQUAL(value["test"].GetDouble(), 0.0);
UNIT_ASSERT_EQUAL(value["test"].GetDoubleRobust(), static_cast<double>(Max<ui64>()));
} // Max<ui64>()
- } // TJsonDoubleTest
+ } // TJsonDoubleTest
Y_UNIT_TEST(TJsonInvalidTest) {
{
@@ -473,12 +473,10 @@ Y_UNIT_TEST_SUITE(TJsonReaderTest) {
UNIT_ASSERT(!ReadJsonTree(&jsonStream, &config, &v));
}
}
-}
-
+} // Y_UNIT_TEST_SUITE(TJsonReaderTest)
static const TString YANDEX_STREAMING_JSON("{\"a\":1}//d{\"b\":2}");
-
Y_UNIT_TEST_SUITE(TCompareReadJsonFast) {
Y_UNIT_TEST(NoEndl) {
NJson::TJsonValue parsed;
@@ -504,4 +502,4 @@ Y_UNIT_TEST_SUITE(TCompareReadJsonFast) {
bool fast_success = NJson::ReadJsonFastTree(streamingJson, &parsed, false);
UNIT_ASSERT(success != fast_success);
}
-}
+} // Y_UNIT_TEST_SUITE(TCompareReadJsonFast)
diff --git a/library/cpp/json/ut/json_saveload_ut.cpp b/library/cpp/json/ut/json_saveload_ut.cpp
index b480a80fe4c..979469dfda0 100644
--- a/library/cpp/json/ut/json_saveload_ut.cpp
+++ b/library/cpp/json/ut/json_saveload_ut.cpp
@@ -7,7 +7,6 @@
Y_UNIT_TEST_SUITE(JsonSaveLoad) {
Y_UNIT_TEST(Serialize) {
-
NJson::TJsonValue expected;
expected["ui64"] = ui64(1);
@@ -33,4 +32,4 @@ Y_UNIT_TEST_SUITE(JsonSaveLoad) {
UNIT_ASSERT_EQUAL_C(expected, load, "expected: " << expected << ", got: " << load);
}
-}
+} // Y_UNIT_TEST_SUITE(JsonSaveLoad)
diff --git a/library/cpp/json/ut/json_writer_ut.cpp b/library/cpp/json/ut/json_writer_ut.cpp
index ca11d34dad9..4dcee17230a 100644
--- a/library/cpp/json/ut/json_writer_ut.cpp
+++ b/library/cpp/json/ut/json_writer_ut.cpp
@@ -120,7 +120,7 @@ Y_UNIT_TEST_SUITE(TJsonWriterTest) {
WriteJson(&out, &v);
UNIT_ASSERT_VALUES_EQUAL(out.Str(), expected);
} // 18446744073709551615
- } // SimpleUnsignedIntegerWriteTest
+ } // SimpleUnsignedIntegerWriteTest
Y_UNIT_TEST(WriteOptionalTest) {
{
@@ -225,4 +225,4 @@ Y_UNIT_TEST_SUITE(TJsonWriterTest) {
UNIT_ASSERT_VALUES_EQUAL(actual, expected);
}
}
-}
+} // Y_UNIT_TEST_SUITE(TJsonWriterTest)