summaryrefslogtreecommitdiff
path: root/test/tgbot/net/Url.cpp
diff options
context:
space:
mode:
authorOleg Morozenkov <m@oleg.rocks>2018-07-23 02:35:50 +0300
committerOleg Morozenkov <m@oleg.rocks>2018-07-23 02:35:50 +0300
commit98b8b7e4338b71ee46c4301b0bf2ae667be9a99d (patch)
tree32f8b0d32048b2d83b57773c0efa3db9600b8701 /test/tgbot/net/Url.cpp
parent1dd3affe306793d2129f121c11e43c45ae8690da (diff)
parent167e3e7607e43a0f06c7f87ced94f481e6525b0e (diff)
Merge branch 'master' into nicholascw-master
Diffstat (limited to 'test/tgbot/net/Url.cpp')
-rw-r--r--test/tgbot/net/Url.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/test/tgbot/net/Url.cpp b/test/tgbot/net/Url.cpp
index abd90cb..0974ab6 100644
--- a/test/tgbot/net/Url.cpp
+++ b/test/tgbot/net/Url.cpp
@@ -29,30 +29,30 @@ using namespace TgBot;
BOOST_AUTO_TEST_SUITE(tUrl)
BOOST_AUTO_TEST_CASE(parsingUrlNoPath) {
- Url t("https://test.example.com?test=123&123=test#title");
- BOOST_CHECK_EQUAL(t.protocol, "https");
- BOOST_CHECK_EQUAL(t.host, "test.example.com");
- BOOST_CHECK_EQUAL(t.path, "/");
- BOOST_CHECK_EQUAL(t.query, "test=123&123=test");
- BOOST_CHECK_EQUAL(t.fragment, "title");
+ Url t("https://test.example.com?test=123&123=test#title");
+ BOOST_CHECK_EQUAL(t.protocol, "https");
+ BOOST_CHECK_EQUAL(t.host, "test.example.com");
+ BOOST_CHECK_EQUAL(t.path, "/");
+ BOOST_CHECK_EQUAL(t.query, "test=123&123=test");
+ BOOST_CHECK_EQUAL(t.fragment, "title");
}
BOOST_AUTO_TEST_CASE(parsingUrlNoPathAndQuery) {
- Url t("https://test.example.com#title");
- BOOST_CHECK_EQUAL(t.protocol, "https");
- BOOST_CHECK_EQUAL(t.host, "test.example.com");
- BOOST_CHECK_EQUAL(t.path, "/");
- BOOST_CHECK_EQUAL(t.query, "");
- BOOST_CHECK_EQUAL(t.fragment, "title");
+ Url t("https://test.example.com#title");
+ BOOST_CHECK_EQUAL(t.protocol, "https");
+ BOOST_CHECK_EQUAL(t.host, "test.example.com");
+ BOOST_CHECK_EQUAL(t.path, "/");
+ BOOST_CHECK_EQUAL(t.query, "");
+ BOOST_CHECK_EQUAL(t.fragment, "title");
}
BOOST_AUTO_TEST_CASE(parsingUrlFull) {
- Url t("https://test.example.com/example-page/index.html?test=123&123=test#title");
- BOOST_CHECK_EQUAL(t.protocol, "https");
- BOOST_CHECK_EQUAL(t.host, "test.example.com");
- BOOST_CHECK_EQUAL(t.path, "/example-page/index.html");
- BOOST_CHECK_EQUAL(t.query, "test=123&123=test");
- BOOST_CHECK_EQUAL(t.fragment, "title");
+ Url t("https://test.example.com/example-page/index.html?test=123&123=test#title");
+ BOOST_CHECK_EQUAL(t.protocol, "https");
+ BOOST_CHECK_EQUAL(t.host, "test.example.com");
+ BOOST_CHECK_EQUAL(t.path, "/example-page/index.html");
+ BOOST_CHECK_EQUAL(t.query, "test=123&123=test");
+ BOOST_CHECK_EQUAL(t.fragment, "title");
}
BOOST_AUTO_TEST_SUITE_END()