aboutsummaryrefslogtreecommitdiffstats
path: root/util/network/endpoint_ut.cpp
diff options
context:
space:
mode:
authorAnton Samokhvalov <pg83@yandex.ru>2022-02-10 16:45:17 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:17 +0300
commitd3a398281c6fd1d3672036cb2d63f842d2cb28c5 (patch)
treedd4bd3ca0f36b817e96812825ffaf10d645803f2 /util/network/endpoint_ut.cpp
parent72cb13b4aff9bc9cf22e49251bc8fd143f82538f (diff)
downloadydb-d3a398281c6fd1d3672036cb2d63f842d2cb28c5.tar.gz
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 2 of 2.
Diffstat (limited to 'util/network/endpoint_ut.cpp')
-rw-r--r--util/network/endpoint_ut.cpp52
1 files changed, 26 insertions, 26 deletions
diff --git a/util/network/endpoint_ut.cpp b/util/network/endpoint_ut.cpp
index f0050a1d86..d5e40dd6e1 100644
--- a/util/network/endpoint_ut.cpp
+++ b/util/network/endpoint_ut.cpp
@@ -8,33 +8,33 @@
Y_UNIT_TEST_SUITE(TEndpointTest) {
Y_UNIT_TEST(TestSimple) {
TVector<TNetworkAddress> addrs;
-
+
TEndpoint ep0;
UNIT_ASSERT(ep0.IsIpV4());
UNIT_ASSERT_VALUES_EQUAL(0, ep0.Port());
UNIT_ASSERT_VALUES_EQUAL("0.0.0.0", ep0.IpToString());
- TEndpoint ep1;
-
- try {
- TNetworkAddress na1("25.26.27.28", 24242);
-
- addrs.push_back(na1);
-
- ep1 = TEndpoint(new NAddr::TAddrInfo(&*na1.Begin()));
-
- UNIT_ASSERT(ep1.IsIpV4());
- UNIT_ASSERT_VALUES_EQUAL("25.26.27.28", ep1.IpToString());
- UNIT_ASSERT_VALUES_EQUAL(24242, ep1.Port());
- } catch (const TNetworkResolutionError&) {
- TNetworkAddress n("2a02:6b8:0:1420:0::5f6c:f3c2", 11111);
-
- addrs.push_back(n);
-
- ep1 = TEndpoint(new NAddr::TAddrInfo(&*n.Begin()));
- }
-
+ TEndpoint ep1;
+
+ try {
+ TNetworkAddress na1("25.26.27.28", 24242);
+
+ addrs.push_back(na1);
+
+ ep1 = TEndpoint(new NAddr::TAddrInfo(&*na1.Begin()));
+
+ UNIT_ASSERT(ep1.IsIpV4());
+ UNIT_ASSERT_VALUES_EQUAL("25.26.27.28", ep1.IpToString());
+ UNIT_ASSERT_VALUES_EQUAL(24242, ep1.Port());
+ } catch (const TNetworkResolutionError&) {
+ TNetworkAddress n("2a02:6b8:0:1420:0::5f6c:f3c2", 11111);
+
+ addrs.push_back(n);
+
+ ep1 = TEndpoint(new NAddr::TAddrInfo(&*n.Begin()));
+ }
+
ep0.SetPort(12345);
TEndpoint ep2(ep0);
@@ -89,17 +89,17 @@ Y_UNIT_TEST_SUITE(TEndpointTest) {
Y_UNIT_TEST(TestEqual) {
const TString ip1 = "2a02:6b8:0:1410::5f6c:f3c2";
const TString ip2 = "2a02:6b8:0:1410::5f6c:f3c3";
-
- TNetworkAddress na1(ip1, 24242);
+
+ TNetworkAddress na1(ip1, 24242);
TEndpoint ep1(new NAddr::TAddrInfo(&*na1.Begin()));
- TNetworkAddress na2(ip1, 24242);
+ TNetworkAddress na2(ip1, 24242);
TEndpoint ep2(new NAddr::TAddrInfo(&*na2.Begin()));
- TNetworkAddress na3(ip2, 24242);
+ TNetworkAddress na3(ip2, 24242);
TEndpoint ep3(new NAddr::TAddrInfo(&*na3.Begin()));
- TNetworkAddress na4(ip2, 24243);
+ TNetworkAddress na4(ip2, 24243);
TEndpoint ep4(new NAddr::TAddrInfo(&*na4.Begin()));
UNIT_ASSERT(ep1 == ep2);