forked from cpp-netlib/cpp-netlib
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added some tests to access the default port given a URI scheme.
- Loading branch information
Showing
6 changed files
with
118 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Copyright 2012 Glyn Matthews. | ||
// Distributed under the Boost Software License, Version 1.0. | ||
// (See accompanying file LICENSE_1_0.txt or copy at | ||
// http://www.boost.org/LICENSE_1_0.txt) | ||
|
||
#define BOOST_TEST_MODULE URI Scheme Test | ||
#include <boost/config/warning_disable.hpp> | ||
#include <boost/test/unit_test.hpp> | ||
#include <network/uri.hpp> | ||
|
||
BOOST_AUTO_TEST_CASE(http_has_default_port) { | ||
BOOST_CHECK(network::default_port("http")); | ||
} | ||
|
||
BOOST_AUTO_TEST_CASE(http_default_port) { | ||
BOOST_CHECK_EQUAL(std::string("80"), network::default_port("http")); | ||
} | ||
|
||
BOOST_AUTO_TEST_CASE(https_has_default_port) { | ||
BOOST_CHECK(network::default_port("https")); | ||
} | ||
|
||
BOOST_AUTO_TEST_CASE(https_default_port) { | ||
BOOST_CHECK_EQUAL(std::string("443"), network::default_port("https")); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters