aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/yson_pull
diff options
context:
space:
mode:
authortobo <tobo@yandex-team.ru>2022-02-10 16:47:27 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:47:27 +0300
commit7fe839092527589b38f014d854c51565b3c1adfa (patch)
tree309e97022d3530044b712b8f71318c78faf7856e /library/cpp/yson_pull
parentd0d68c395c10da4cb56a1c845504570a04d7893e (diff)
downloadydb-7fe839092527589b38f014d854c51565b3c1adfa.tar.gz
Restoring authorship annotation for <tobo@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/yson_pull')
-rw-r--r--library/cpp/yson_pull/detail/percent_scalar.h10
-rw-r--r--library/cpp/yson_pull/read_ops.cpp4
-rw-r--r--library/cpp/yson_pull/ut/reader_ut.cpp130
-rw-r--r--library/cpp/yson_pull/ut/writer_ut.cpp60
4 files changed, 102 insertions, 102 deletions
diff --git a/library/cpp/yson_pull/detail/percent_scalar.h b/library/cpp/yson_pull/detail/percent_scalar.h
index ff4571842e..4dfb57d36b 100644
--- a/library/cpp/yson_pull/detail/percent_scalar.h
+++ b/library/cpp/yson_pull/detail/percent_scalar.h
@@ -10,12 +10,12 @@ namespace NYsonPull::NDetail {
struct percent_scalar {
//! Text boolean literals
- static constexpr TStringBuf true_literal = "%true";
- static constexpr TStringBuf false_literal = "%false";
+ static constexpr TStringBuf true_literal = "%true";
+ static constexpr TStringBuf false_literal = "%false";
//! Text floating-point literals
- static constexpr TStringBuf nan_literal = "%nan";
- static constexpr TStringBuf positive_inf_literal = "%inf";
- static constexpr TStringBuf negative_inf_literal = "%-inf";
+ static constexpr TStringBuf nan_literal = "%nan";
+ static constexpr TStringBuf positive_inf_literal = "%inf";
+ static constexpr TStringBuf negative_inf_literal = "%-inf";
percent_scalar_type type;
union {
diff --git a/library/cpp/yson_pull/read_ops.cpp b/library/cpp/yson_pull/read_ops.cpp
index 9d7e6a4a2d..6ca8313d54 100644
--- a/library/cpp/yson_pull/read_ops.cpp
+++ b/library/cpp/yson_pull/read_ops.cpp
@@ -4,7 +4,7 @@ using namespace NYsonPull;
using namespace NYsonPull::NReadOps;
namespace {
- bool TrySkipValueUntil(EEventType end, TReader& reader) {
+ bool TrySkipValueUntil(EEventType end, TReader& reader) {
const auto& event = reader.NextEvent();
if (event.Type() == end) {
return false;
@@ -13,7 +13,7 @@ namespace {
return true;
}
- bool TrySkipKeyValueUntil(EEventType end, TReader& reader) {
+ bool TrySkipKeyValueUntil(EEventType end, TReader& reader) {
const auto& event = reader.NextEvent();
if (event.Type() == end) {
return false;
diff --git a/library/cpp/yson_pull/ut/reader_ut.cpp b/library/cpp/yson_pull/ut/reader_ut.cpp
index 1184265ddb..c40f05e551 100644
--- a/library/cpp/yson_pull/ut/reader_ut.cpp
+++ b/library/cpp/yson_pull/ut/reader_ut.cpp
@@ -75,15 +75,15 @@ namespace {
Y_UNIT_TEST_SUITE(Reader) {
Y_UNIT_TEST(ScalarEntity) {
- test_scalar(TStringBuf("#"), NYsonPull::TScalar{});
+ test_scalar(TStringBuf("#"), NYsonPull::TScalar{});
}
Y_UNIT_TEST(ScalarBoolean) {
- test_scalar(TStringBuf("%true"), true);
- test_scalar(TStringBuf("%false"), false);
+ test_scalar(TStringBuf("%true"), true);
+ test_scalar(TStringBuf("%false"), false);
- test_scalar(TStringBuf("\x05"sv), true);
- test_scalar(TStringBuf("\x04"sv), false);
+ test_scalar(TStringBuf("\x05"sv), true);
+ test_scalar(TStringBuf("\x04"sv), false);
REJECT("%");
REJECT("%trueth");
@@ -94,18 +94,18 @@ Y_UNIT_TEST_SUITE(Reader) {
}
Y_UNIT_TEST(ScalarInt64) {
- test_scalar(TStringBuf("1"), i64{1});
- test_scalar(TStringBuf("+1"), i64{1});
- test_scalar(TStringBuf("100000"), i64{100000});
- test_scalar(TStringBuf("+100000"), i64{100000});
- test_scalar(TStringBuf("-100000"), i64{-100000});
- test_scalar(TStringBuf("9223372036854775807"), i64{9223372036854775807});
- test_scalar(TStringBuf("+9223372036854775807"), i64{9223372036854775807});
-
- test_scalar(TStringBuf("\x02\x02"sv), i64{1});
- test_scalar(TStringBuf("\x02\xc0\x9a\x0c"sv), i64{100000});
- test_scalar(TStringBuf("\x02\xbf\x9a\x0c"sv), i64{-100000});
- test_scalar(TStringBuf("\x02\xfe\xff\xff\xff\xff\xff\xff\xff\xff\x01"sv), i64{9223372036854775807});
+ test_scalar(TStringBuf("1"), i64{1});
+ test_scalar(TStringBuf("+1"), i64{1});
+ test_scalar(TStringBuf("100000"), i64{100000});
+ test_scalar(TStringBuf("+100000"), i64{100000});
+ test_scalar(TStringBuf("-100000"), i64{-100000});
+ test_scalar(TStringBuf("9223372036854775807"), i64{9223372036854775807});
+ test_scalar(TStringBuf("+9223372036854775807"), i64{9223372036854775807});
+
+ test_scalar(TStringBuf("\x02\x02"sv), i64{1});
+ test_scalar(TStringBuf("\x02\xc0\x9a\x0c"sv), i64{100000});
+ test_scalar(TStringBuf("\x02\xbf\x9a\x0c"sv), i64{-100000});
+ test_scalar(TStringBuf("\x02\xfe\xff\xff\xff\xff\xff\xff\xff\xff\x01"sv), i64{9223372036854775807});
REJECT("1a2");
REJECT("1-1-1-1");
@@ -113,14 +113,14 @@ Y_UNIT_TEST_SUITE(Reader) {
}
Y_UNIT_TEST(SclarUInt64) {
- test_scalar(TStringBuf("1u"), ui64{1});
- test_scalar(TStringBuf("+1u"), ui64{1});
- test_scalar(TStringBuf("100000u"), ui64{100000});
- test_scalar(TStringBuf("+100000u"), ui64{100000});
- test_scalar(TStringBuf("9223372036854775807u"), ui64{9223372036854775807u});
- test_scalar(TStringBuf("+9223372036854775807u"), ui64{9223372036854775807u});
- test_scalar(TStringBuf("18446744073709551615u"), ui64{18446744073709551615u});
- test_scalar(TStringBuf("+18446744073709551615u"), ui64{18446744073709551615u});
+ test_scalar(TStringBuf("1u"), ui64{1});
+ test_scalar(TStringBuf("+1u"), ui64{1});
+ test_scalar(TStringBuf("100000u"), ui64{100000});
+ test_scalar(TStringBuf("+100000u"), ui64{100000});
+ test_scalar(TStringBuf("9223372036854775807u"), ui64{9223372036854775807u});
+ test_scalar(TStringBuf("+9223372036854775807u"), ui64{9223372036854775807u});
+ test_scalar(TStringBuf("18446744073709551615u"), ui64{18446744073709551615u});
+ test_scalar(TStringBuf("+18446744073709551615u"), ui64{18446744073709551615u});
REJECT("1a2u");
REJECT("1-1-1-1u");
@@ -130,45 +130,45 @@ Y_UNIT_TEST_SUITE(Reader) {
}
Y_UNIT_TEST(ScalarFloat64) {
- test_scalar(TStringBuf("0.0"), double{0.0});
- test_scalar(TStringBuf("+0.0"), double{0.0});
- test_scalar(TStringBuf("+.0"), double{0.0});
- test_scalar(TStringBuf("+.5"), double{0.5});
- test_scalar(TStringBuf("-.5"), double{-0.5});
- test_scalar(TStringBuf("1.0"), double{1.0});
- test_scalar(TStringBuf("+1.0"), double{1.0});
- test_scalar(TStringBuf("-1.0"), double{-1.0});
- test_scalar(TStringBuf("1000.0"), double{1000.0});
- test_scalar(TStringBuf("+1000.0"), double{1000.0});
- test_scalar(TStringBuf("-1000.0"), double{-1000.0});
- test_scalar(TStringBuf("1e12"), double{1e12});
- test_scalar(TStringBuf("1e+12"), double{1e12});
- test_scalar(TStringBuf("+1e+12"), double{1e12});
- test_scalar(TStringBuf("-1e+12"), double{-1e12});
- test_scalar(TStringBuf("1e-12"), double{1e-12});
- test_scalar(TStringBuf("+1e-12"), double{1e-12});
- test_scalar(TStringBuf("-1e-12"), double{-1e-12});
-
- test_scalar(TStringBuf("\x03\x00\x00\x00\x00\x00\x00\x00\x00"sv), double{0.0});
+ test_scalar(TStringBuf("0.0"), double{0.0});
+ test_scalar(TStringBuf("+0.0"), double{0.0});
+ test_scalar(TStringBuf("+.0"), double{0.0});
+ test_scalar(TStringBuf("+.5"), double{0.5});
+ test_scalar(TStringBuf("-.5"), double{-0.5});
+ test_scalar(TStringBuf("1.0"), double{1.0});
+ test_scalar(TStringBuf("+1.0"), double{1.0});
+ test_scalar(TStringBuf("-1.0"), double{-1.0});
+ test_scalar(TStringBuf("1000.0"), double{1000.0});
+ test_scalar(TStringBuf("+1000.0"), double{1000.0});
+ test_scalar(TStringBuf("-1000.0"), double{-1000.0});
+ test_scalar(TStringBuf("1e12"), double{1e12});
+ test_scalar(TStringBuf("1e+12"), double{1e12});
+ test_scalar(TStringBuf("+1e+12"), double{1e12});
+ test_scalar(TStringBuf("-1e+12"), double{-1e12});
+ test_scalar(TStringBuf("1e-12"), double{1e-12});
+ test_scalar(TStringBuf("+1e-12"), double{1e-12});
+ test_scalar(TStringBuf("-1e-12"), double{-1e-12});
+
+ test_scalar(TStringBuf("\x03\x00\x00\x00\x00\x00\x00\x00\x00"sv), double{0.0});
test_scalar(
- TStringBuf("\x03\x00\x00\x00\x00\x00\x00\xf8\x7f"sv),
+ TStringBuf("\x03\x00\x00\x00\x00\x00\x00\xf8\x7f"sv),
double{std::numeric_limits<double>::quiet_NaN()});
test_scalar(
- TStringBuf("\x03\x00\x00\x00\x00\x00\x00\xf0\x7f"sv),
+ TStringBuf("\x03\x00\x00\x00\x00\x00\x00\xf0\x7f"sv),
double{std::numeric_limits<double>::infinity()});
test_scalar(
- TStringBuf("\x03\x00\x00\x00\x00\x00\x00\xf0\xff"sv),
+ TStringBuf("\x03\x00\x00\x00\x00\x00\x00\xf0\xff"sv),
double{-std::numeric_limits<double>::infinity()});
test_scalar(
- TStringBuf("%nan"),
+ TStringBuf("%nan"),
double{std::numeric_limits<double>::quiet_NaN()});
test_scalar(
- TStringBuf("%inf"),
+ TStringBuf("%inf"),
double{std::numeric_limits<double>::infinity()});
test_scalar(
- TStringBuf("%-inf"),
+ TStringBuf("%-inf"),
double{-std::numeric_limits<double>::infinity()});
REJECT("++0.0");
@@ -176,7 +176,7 @@ Y_UNIT_TEST_SUITE(Reader) {
REJECT("++.1");
REJECT("1.0.0");
//REJECT("1e+10000");
- REJECT(TStringBuf("\x03\x00\x00\x00\x00\x00\x00\x00"sv));
+ REJECT(TStringBuf("\x03\x00\x00\x00\x00\x00\x00\x00"sv));
// XXX: Questionable behaviour?
ACCEPT("+.0");
@@ -194,16 +194,16 @@ Y_UNIT_TEST_SUITE(Reader) {
}
Y_UNIT_TEST(ScalarString) {
- test_scalar(TStringBuf(R"(foobar)"), TStringBuf("foobar"));
- test_scalar(TStringBuf(R"(foobar11)"), TStringBuf("foobar11"));
- test_scalar(TStringBuf(R"("foobar")"), TStringBuf("foobar"));
+ test_scalar(TStringBuf(R"(foobar)"), TStringBuf("foobar"));
+ test_scalar(TStringBuf(R"(foobar11)"), TStringBuf("foobar11"));
+ test_scalar(TStringBuf(R"("foobar")"), TStringBuf("foobar"));
// wat? "\x0cf" parsed as a single char? no way!
- test_scalar("\x01\x0c" "foobar"sv,
- TStringBuf("foobar"));
+ test_scalar("\x01\x0c" "foobar"sv,
+ TStringBuf("foobar"));
REJECT(R"("foobar)");
- REJECT("\x01\x0c" "fooba"sv);
- REJECT("\x01\x0d" "foobar"sv); // negative length
+ REJECT("\x01\x0c" "fooba"sv);
+ REJECT("\x01\x0d" "foobar"sv); // negative length
}
Y_UNIT_TEST(EmptyList) {
@@ -241,7 +241,7 @@ Y_UNIT_TEST_SUITE(Reader) {
{
auto& e = reader.NextEvent();
UNIT_ASSERT_VALUES_EQUAL(NYsonPull::EEventType::Key, e.Type());
- UNIT_ASSERT_VALUES_EQUAL(TStringBuf("11"), e.AsString());
+ UNIT_ASSERT_VALUES_EQUAL(TStringBuf("11"), e.AsString());
}
{
auto& e = reader.NextEvent();
@@ -252,7 +252,7 @@ Y_UNIT_TEST_SUITE(Reader) {
{
auto& e = reader.NextEvent();
UNIT_ASSERT_VALUES_EQUAL(NYsonPull::EEventType::Key, e.Type());
- UNIT_ASSERT_VALUES_EQUAL(TStringBuf("nothing"), e.AsString());
+ UNIT_ASSERT_VALUES_EQUAL(TStringBuf("nothing"), e.AsString());
}
{
auto& e = reader.NextEvent();
@@ -263,7 +263,7 @@ Y_UNIT_TEST_SUITE(Reader) {
{
auto& e = reader.NextEvent();
UNIT_ASSERT_VALUES_EQUAL(NYsonPull::EEventType::Key, e.Type());
- UNIT_ASSERT_VALUES_EQUAL(TStringBuf("zero"), e.AsString());
+ UNIT_ASSERT_VALUES_EQUAL(TStringBuf("zero"), e.AsString());
}
{
auto& e = reader.NextEvent();
@@ -274,18 +274,18 @@ Y_UNIT_TEST_SUITE(Reader) {
{
auto& e = reader.NextEvent();
UNIT_ASSERT_VALUES_EQUAL(NYsonPull::EEventType::Key, e.Type());
- UNIT_ASSERT_VALUES_EQUAL(TStringBuf("foo"), e.AsString());
+ UNIT_ASSERT_VALUES_EQUAL(TStringBuf("foo"), e.AsString());
}
{
auto& e = reader.NextEvent();
UNIT_ASSERT_VALUES_EQUAL(NYsonPull::EEventType::Scalar, e.Type());
- UNIT_ASSERT_VALUES_EQUAL(NYsonPull::TScalar{TStringBuf("bar")}, e.AsScalar());
+ UNIT_ASSERT_VALUES_EQUAL(NYsonPull::TScalar{TStringBuf("bar")}, e.AsScalar());
}
{
auto& e = reader.NextEvent();
UNIT_ASSERT_VALUES_EQUAL(NYsonPull::EEventType::Key, e.Type());
- UNIT_ASSERT_VALUES_EQUAL(TStringBuf("list"), e.AsString());
+ UNIT_ASSERT_VALUES_EQUAL(TStringBuf("list"), e.AsString());
}
UNIT_ASSERT_VALUES_EQUAL(NYsonPull::EEventType::BeginList, reader.NextEvent().Type());
{
diff --git a/library/cpp/yson_pull/ut/writer_ut.cpp b/library/cpp/yson_pull/ut/writer_ut.cpp
index 5c304bad0f..aa9aa1cff9 100644
--- a/library/cpp/yson_pull/ut/writer_ut.cpp
+++ b/library/cpp/yson_pull/ut/writer_ut.cpp
@@ -8,8 +8,8 @@
#include <climits>
#include <limits>
-using namespace std::string_view_literals;
-
+using namespace std::string_view_literals;
+
namespace {
template <typename Writer, typename Function>
TString with_writer(Function&& function) {
@@ -155,101 +155,101 @@ Y_UNIT_TEST_SUITE(Writer) {
Y_UNIT_TEST(BinaryBoolean) {
UNIT_ASSERT_VALUES_EQUAL(
- TStringBuf("\x4"),
+ TStringBuf("\x4"),
to_yson_binary_string(NYsonPull::TScalar{false}));
UNIT_ASSERT_VALUES_EQUAL(
- TStringBuf("\x5"),
+ TStringBuf("\x5"),
to_yson_binary_string(NYsonPull::TScalar{true}));
}
Y_UNIT_TEST(BinaryInt64) {
UNIT_ASSERT_VALUES_EQUAL(
- TStringBuf("\x2\0"sv),
+ TStringBuf("\x2\0"sv),
to_yson_binary_string(NYsonPull::TScalar{i64{0}}));
UNIT_ASSERT_VALUES_EQUAL(
- TStringBuf("\x2\x90\x3"),
+ TStringBuf("\x2\x90\x3"),
to_yson_binary_string(NYsonPull::TScalar{i64{200}}));
UNIT_ASSERT_VALUES_EQUAL(
- TStringBuf("\x2\xC0\xB8\x2"),
+ TStringBuf("\x2\xC0\xB8\x2"),
to_yson_binary_string(NYsonPull::TScalar{i64{20000}}));
UNIT_ASSERT_VALUES_EQUAL(
- TStringBuf("\x2\x80\x88\xDE\xBE\x1"),
+ TStringBuf("\x2\x80\x88\xDE\xBE\x1"),
to_yson_binary_string(NYsonPull::TScalar{i64{200000000}}));
UNIT_ASSERT_VALUES_EQUAL(
- TStringBuf("\x2\x80\x80\x90\xF8\x9B\xF9\x86G"),
+ TStringBuf("\x2\x80\x80\x90\xF8\x9B\xF9\x86G"),
to_yson_binary_string(NYsonPull::TScalar{i64{20000000000000000}}));
UNIT_ASSERT_VALUES_EQUAL(
- TStringBuf("\x2\xFE\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x1"),
+ TStringBuf("\x2\xFE\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x1"),
to_yson_binary_string(NYsonPull::TScalar{i64{INT64_MAX}}));
UNIT_ASSERT_VALUES_EQUAL(
- TStringBuf("\x2\x8F\x3"),
+ TStringBuf("\x2\x8F\x3"),
to_yson_binary_string(NYsonPull::TScalar{i64{-200}}));
UNIT_ASSERT_VALUES_EQUAL(
- TStringBuf("\x2\xBF\xB8\x2"),
+ TStringBuf("\x2\xBF\xB8\x2"),
to_yson_binary_string(NYsonPull::TScalar{i64{-20000}}));
UNIT_ASSERT_VALUES_EQUAL(
- TStringBuf("\x2\xFF\x87\xDE\xBE\x1"),
+ TStringBuf("\x2\xFF\x87\xDE\xBE\x1"),
to_yson_binary_string(NYsonPull::TScalar{i64{-200000000}}));
UNIT_ASSERT_VALUES_EQUAL(
- TStringBuf("\x2\xFF\xFF\x8F\xF8\x9B\xF9\x86G"),
+ TStringBuf("\x2\xFF\xFF\x8F\xF8\x9B\xF9\x86G"),
to_yson_binary_string(NYsonPull::TScalar{i64{-20000000000000000}}));
UNIT_ASSERT_VALUES_EQUAL(
- TStringBuf("\x2\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x1"),
+ TStringBuf("\x2\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x1"),
to_yson_binary_string(NYsonPull::TScalar{i64{INT64_MIN}}));
}
Y_UNIT_TEST(BinaryUInt64) {
UNIT_ASSERT_VALUES_EQUAL(
- TStringBuf("\x6\0"sv),
+ TStringBuf("\x6\0"sv),
to_yson_binary_string(NYsonPull::TScalar{ui64{0}}));
UNIT_ASSERT_VALUES_EQUAL(
- TStringBuf("\x6\xC8\x1"),
+ TStringBuf("\x6\xC8\x1"),
to_yson_binary_string(NYsonPull::TScalar{ui64{200}}));
UNIT_ASSERT_VALUES_EQUAL(
- TStringBuf("\x6\xA0\x9C\x1"),
+ TStringBuf("\x6\xA0\x9C\x1"),
to_yson_binary_string(NYsonPull::TScalar{ui64{20000}}));
UNIT_ASSERT_VALUES_EQUAL(
- TStringBuf("\x6\x80\x84\xAF_"),
+ TStringBuf("\x6\x80\x84\xAF_"),
to_yson_binary_string(NYsonPull::TScalar{ui64{200000000}}));
UNIT_ASSERT_VALUES_EQUAL(
- TStringBuf("\x6\x80\x80\x88\xFC\xCD\xBC\xC3#"),
+ TStringBuf("\x6\x80\x80\x88\xFC\xCD\xBC\xC3#"),
to_yson_binary_string(NYsonPull::TScalar{ui64{20000000000000000}}));
UNIT_ASSERT_VALUES_EQUAL(
- TStringBuf("\x6\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x7F"),
+ TStringBuf("\x6\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x7F"),
to_yson_binary_string(NYsonPull::TScalar{ui64{INT64_MAX}}));
UNIT_ASSERT_VALUES_EQUAL(
- TStringBuf("\x6\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x1"),
+ TStringBuf("\x6\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x1"),
to_yson_binary_string(NYsonPull::TScalar{ui64{UINT64_MAX}}));
}
Y_UNIT_TEST(BinaryFloat64) {
UNIT_ASSERT_VALUES_EQUAL(
- TStringBuf("\x03\x00\x00\x00\x00\x00\x00\xf0\x7f"sv),
+ TStringBuf("\x03\x00\x00\x00\x00\x00\x00\xf0\x7f"sv),
to_yson_binary_string(NYsonPull::TScalar{std::numeric_limits<double>::infinity()}));
UNIT_ASSERT_VALUES_EQUAL(
- TStringBuf("\x03\x00\x00\x00\x00\x00\x00\xf0\xff"sv),
+ TStringBuf("\x03\x00\x00\x00\x00\x00\x00\xf0\xff"sv),
to_yson_binary_string(NYsonPull::TScalar{-std::numeric_limits<double>::infinity()}));
UNIT_ASSERT_VALUES_EQUAL(
- TStringBuf("\x03\x00\x00\x00\x00\x00\x00\xf8\x7f"sv),
+ TStringBuf("\x03\x00\x00\x00\x00\x00\x00\xf8\x7f"sv),
to_yson_binary_string(NYsonPull::TScalar{std::numeric_limits<double>::quiet_NaN()}));
UNIT_ASSERT_VALUES_EQUAL(
- TStringBuf("\x03\x9a\x99\x99\x99\x99\x99\xf1\x3f"),
+ TStringBuf("\x03\x9a\x99\x99\x99\x99\x99\xf1\x3f"),
to_yson_binary_string(NYsonPull::TScalar{double{1.1}}));
UNIT_ASSERT_VALUES_EQUAL(
- TStringBuf("\x03\x9a\x99\x99\x99\x99\x99\xf1\xbf"),
+ TStringBuf("\x03\x9a\x99\x99\x99\x99\x99\xf1\xbf"),
to_yson_binary_string(NYsonPull::TScalar{double{-1.1}}));
}
Y_UNIT_TEST(BinaryString) {
UNIT_ASSERT_VALUES_EQUAL(
- TStringBuf("\x1\0"sv),
+ TStringBuf("\x1\0"sv),
to_yson_binary_string(NYsonPull::TScalar{""}));
UNIT_ASSERT_VALUES_EQUAL(
- TStringBuf("\x1\nhello"),
+ TStringBuf("\x1\nhello"),
to_yson_binary_string(NYsonPull::TScalar{"hello"}));
UNIT_ASSERT_VALUES_EQUAL(
- TStringBuf("\x1\x16hello\nworld"),
+ TStringBuf("\x1\x16hello\nworld"),
to_yson_binary_string(NYsonPull::TScalar{"hello\nworld"}));
}