aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp
diff options
context:
space:
mode:
authorpg <pg@yandex-team.com>2023-08-31 02:33:19 +0300
committerpg <pg@yandex-team.com>2023-08-31 02:51:25 +0300
commit13004290f7ae5603115f0cd10c6a0e5d0b9c5be9 (patch)
tree7f2ff67afe5d4bf64952c8eb0e00adccb9456499 /library/cpp
parentb4d13c316d4887470a64a24d959eb3b18a56d370 (diff)
downloadydb-13004290f7ae5603115f0cd10c6a0e5d0b9c5be9.tar.gz
Diffstat (limited to 'library/cpp')
-rw-r--r--library/cpp/json/writer/json_value.h4
-rw-r--r--library/cpp/json/writer/json_value_ut.cpp7
2 files changed, 7 insertions, 4 deletions
diff --git a/library/cpp/json/writer/json_value.h b/library/cpp/json/writer/json_value.h
index 3f0f50bc4c8..80aa59b985c 100644
--- a/library/cpp/json/writer/json_value.h
+++ b/library/cpp/json/writer/json_value.h
@@ -179,10 +179,6 @@ namespace NJson {
/// Non-robust comparison.
bool operator==(const TJsonValue& rhs) const;
- bool operator!=(const TJsonValue& rhs) const {
- return !(*this == rhs);
- }
-
void Swap(TJsonValue& rhs) noexcept;
// save using util/ysaveload.h serialization (not to JSON stream)
diff --git a/library/cpp/json/writer/json_value_ut.cpp b/library/cpp/json/writer/json_value_ut.cpp
index dc7f6affdff..ef62d87abac 100644
--- a/library/cpp/json/writer/json_value_ut.cpp
+++ b/library/cpp/json/writer/json_value_ut.cpp
@@ -7,6 +7,13 @@
using namespace NJson;
Y_UNIT_TEST_SUITE(TJsonValueTest) {
+ Y_UNIT_TEST(Equal) {
+ UNIT_ASSERT(1 == TJsonValue(1));
+ UNIT_ASSERT(TJsonValue(1) == 1);
+ UNIT_ASSERT(2 != TJsonValue(1));
+ UNIT_ASSERT(TJsonValue(1) != 2);
+ }
+
Y_UNIT_TEST(UndefTest) {
TJsonValue undef;
TJsonValue null(JSON_NULL);