You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by GitBox <gi...@apache.org> on 2021/04/02 14:01:51 UTC

[GitHub] [qpid-proton] DreamPearl commented on a change in pull request #303: PROTON-2357: Improve test coverage in url.cpp

DreamPearl commented on a change in pull request #303:
URL: https://github.com/apache/qpid-proton/pull/303#discussion_r606250828



##########
File path: cpp/src/url_test.cpp
##########
@@ -111,6 +116,54 @@ TEST_CASE("parse URL","[url]") {
                   "amqp", "user", "pass", "::1", "1234", "path",
                   "amqp://user:pass@[::1]:1234/path");
     }
+    SECTION("port") {
+        CHECK("host:1234" == url("amqp://host:1234/path").host_port());
+        CHECK(5672 == url("amqp://foo/path").port_int());
+        CHECK(5671 == url("amqps://foo/path").port_int());
+        CHECK(1234 == url("amqps://foo:1234/path").port_int());
+
+        url u("amqps://foo:xyz/path");
+        url_error caught_error("");
+        try{
+          u.port_int();
+        }
+        catch(url_error& err){
+          caught_error=err;

Review comment:
       Thanks, Justin and Jiri for your direction. Jiri, I have installed clang-format but I am not able to configure it to match the formatting of the existing code. Can you please guide me on how to configure it according to this project?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org