aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/string_utils/url/url_ut.cpp
diff options
context:
space:
mode:
authoryazevnul <yazevnul@yandex-team.ru>2022-02-10 16:46:46 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:46 +0300
commit8cbc307de0221f84c80c42dcbe07d40727537e2c (patch)
tree625d5a673015d1df891e051033e9fcde5c7be4e5 /library/cpp/string_utils/url/url_ut.cpp
parent30d1ef3941e0dc835be7609de5ebee66958f215a (diff)
downloadydb-8cbc307de0221f84c80c42dcbe07d40727537e2c.tar.gz
Restoring authorship annotation for <yazevnul@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/string_utils/url/url_ut.cpp')
-rw-r--r--library/cpp/string_utils/url/url_ut.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/library/cpp/string_utils/url/url_ut.cpp b/library/cpp/string_utils/url/url_ut.cpp
index 1588013893..2c2f5948a0 100644
--- a/library/cpp/string_utils/url/url_ut.cpp
+++ b/library/cpp/string_utils/url/url_ut.cpp
@@ -4,8 +4,8 @@
#include <library/cpp/testing/unittest/registar.h>
-Y_UNIT_TEST_SUITE(TUtilUrlTest) {
- Y_UNIT_TEST(TestGetHostAndGetHostAndPort) {
+Y_UNIT_TEST_SUITE(TUtilUrlTest) {
+ Y_UNIT_TEST(TestGetHostAndGetHostAndPort) {
UNIT_ASSERT_VALUES_EQUAL("ya.ru", GetHost("ya.ru/bebe"));
UNIT_ASSERT_VALUES_EQUAL("ya.ru", GetHostAndPort("ya.ru/bebe"));
UNIT_ASSERT_VALUES_EQUAL("ya.ru", GetHost("ya.ru"));
@@ -27,7 +27,7 @@ Y_UNIT_TEST_SUITE(TUtilUrlTest) {
UNIT_ASSERT_VALUES_EQUAL("", GetHost(""));
}
- Y_UNIT_TEST(TestGetPathAndQuery) {
+ Y_UNIT_TEST(TestGetPathAndQuery) {
UNIT_ASSERT_VALUES_EQUAL("/", GetPathAndQuery("ru.wikipedia.org"));
UNIT_ASSERT_VALUES_EQUAL("/", GetPathAndQuery("ru.wikipedia.org/"));
UNIT_ASSERT_VALUES_EQUAL("/", GetPathAndQuery("ru.wikipedia.org:8080"));
@@ -39,7 +39,7 @@ Y_UNIT_TEST_SUITE(TUtilUrlTest) {
UNIT_ASSERT_VALUES_EQUAL("/?1#comment", GetPathAndQuery("ru.wikipedia.org/?1#comment", false));
}
- Y_UNIT_TEST(TestGetDomain) {
+ Y_UNIT_TEST(TestGetDomain) {
UNIT_ASSERT_VALUES_EQUAL("ya.ru", GetDomain("www.ya.ru"));
UNIT_ASSERT_VALUES_EQUAL("ya.ru", GetDomain("ya.ru"));
UNIT_ASSERT_VALUES_EQUAL("ya.ru", GetDomain("a.b.ya.ru"));
@@ -48,7 +48,7 @@ Y_UNIT_TEST_SUITE(TUtilUrlTest) {
UNIT_ASSERT_VALUES_EQUAL("", GetDomain(""));
}
- Y_UNIT_TEST(TestGetParentDomain) {
+ Y_UNIT_TEST(TestGetParentDomain) {
UNIT_ASSERT_VALUES_EQUAL("", GetParentDomain("www.ya.ru", 0));
UNIT_ASSERT_VALUES_EQUAL("ru", GetParentDomain("www.ya.ru", 1));
UNIT_ASSERT_VALUES_EQUAL("ya.ru", GetParentDomain("www.ya.ru", 2));
@@ -62,7 +62,7 @@ Y_UNIT_TEST_SUITE(TUtilUrlTest) {
UNIT_ASSERT_VALUES_EQUAL("", GetParentDomain("", 1));
}
- Y_UNIT_TEST(TestGetZone) {
+ Y_UNIT_TEST(TestGetZone) {
UNIT_ASSERT_VALUES_EQUAL("ru", GetZone("www.ya.ru"));
UNIT_ASSERT_VALUES_EQUAL("com", GetZone("ya.com"));
UNIT_ASSERT_VALUES_EQUAL("RU", GetZone("RU"));
@@ -70,7 +70,7 @@ Y_UNIT_TEST_SUITE(TUtilUrlTest) {
UNIT_ASSERT_VALUES_EQUAL("", GetZone(""));
}
- Y_UNIT_TEST(TestAddSchemePrefix) {
+ Y_UNIT_TEST(TestAddSchemePrefix) {
UNIT_ASSERT_VALUES_EQUAL("http://yandex.ru", AddSchemePrefix("yandex.ru"));
UNIT_ASSERT_VALUES_EQUAL("http://yandex.ru", AddSchemePrefix("http://yandex.ru"));
UNIT_ASSERT_VALUES_EQUAL("https://yandex.ru", AddSchemePrefix("https://yandex.ru"));
@@ -78,7 +78,7 @@ Y_UNIT_TEST_SUITE(TUtilUrlTest) {
UNIT_ASSERT_VALUES_EQUAL("ftp://ya.ru", AddSchemePrefix("ya.ru", "ftp"));
}
- Y_UNIT_TEST(TestSchemeGet) {
+ Y_UNIT_TEST(TestSchemeGet) {
UNIT_ASSERT_VALUES_EQUAL("http://", GetSchemePrefix("http://ya.ru/bebe"));
UNIT_ASSERT_VALUES_EQUAL("", GetSchemePrefix("yaru"));
UNIT_ASSERT_VALUES_EQUAL("yaru://", GetSchemePrefix("yaru://ya.ru://zzz"));
@@ -87,7 +87,7 @@ Y_UNIT_TEST_SUITE(TUtilUrlTest) {
UNIT_ASSERT_VALUES_EQUAL("https://", GetSchemePrefix("https://")); // is that right?
}
- Y_UNIT_TEST(TestSchemeCut) {
+ Y_UNIT_TEST(TestSchemeCut) {
UNIT_ASSERT_VALUES_EQUAL("ya.ru/bebe", CutSchemePrefix("http://ya.ru/bebe"));
UNIT_ASSERT_VALUES_EQUAL("yaru", CutSchemePrefix("yaru"));
UNIT_ASSERT_VALUES_EQUAL("ya.ru://zzz", CutSchemePrefix("yaru://ya.ru://zzz"));
@@ -104,7 +104,7 @@ Y_UNIT_TEST_SUITE(TUtilUrlTest) {
UNIT_ASSERT_VALUES_EQUAL("https://", CutHttpPrefix("https://", true)); // is that right?
}
- Y_UNIT_TEST(TestMisc) {
+ Y_UNIT_TEST(TestMisc) {
UNIT_ASSERT_VALUES_EQUAL("", CutWWWPrefix("www."));
UNIT_ASSERT_VALUES_EQUAL("", CutWWWPrefix("WwW."));
UNIT_ASSERT_VALUES_EQUAL("www", CutWWWPrefix("www"));
@@ -127,7 +127,7 @@ Y_UNIT_TEST_SUITE(TUtilUrlTest) {
UNIT_ASSERT_VALUES_EQUAL("ya.ru", CutMPrefix("m.ya.ru"));
}
- Y_UNIT_TEST(TestSplitUrlToHostAndPath) {
+ Y_UNIT_TEST(TestSplitUrlToHostAndPath) {
TStringBuf host, path;
SplitUrlToHostAndPath("https://yandex.ru/yandsearch", host, path);
@@ -175,7 +175,7 @@ Y_UNIT_TEST_SUITE(TUtilUrlTest) {
UNIT_ASSERT_STRINGS_EQUAL(fragment, "fragment");
}
- Y_UNIT_TEST(TestGetSchemeHostAndPort) {
+ Y_UNIT_TEST(TestGetSchemeHostAndPort) {
{ // all components are present
TStringBuf scheme("unknown"), host("unknown");
ui16 port = 0;