@@ -127,29 +127,37 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(ipv4_address_test, T, tag_types) {
127127BOOST_CHECK (boost::equal (uri::path (instance), path));
128128}
129129
130- // // IPv6 is not yet supported by the parser
131- // BOOST_AUTO_TEST_CASE_TEMPLATE(ipv6_address_test, T, tag_types) {
132- // typedef uri::basic_uri<T> uri_type;
133- // typedef typename uri_type::string_type string_type;
134- //
135- // const std::string url("http://1080:0:0:0:8:800:200C:417A/");
136- // const std::string scheme("http");
137- // const std::string host("1080:0:0:8:800:200C:417A");
138- // const std::string path("/");
139- //
140- // uri_type instance(string_type(boost::begin(url), boost::end(url)));
141- // std::cout << uri::scheme(instance) << std::endl;
142- // std::cout << uri::user_info(instance) << std::endl;
143- // std::cout << uri::host(instance) << std::endl;
144- // std::cout << uri::port(instance) << std::endl;
145- // std::cout << uri::path(instance) << std::endl;
146- // std::cout << uri::query(instance) << std::endl;
147- // std::cout << uri::fragment(instance) << std::endl;
148- // BOOST_REQUIRE(uri::is_valid(instance));
149- // BOOST_CHECK(boost::equal(uri::scheme(instance), scheme));
150- // BOOST_CHECK(boost::equal(uri::host(instance), host));
151- // BOOST_CHECK(boost::equal(uri::path(instance), path));
152- // }
130+ BOOST_AUTO_TEST_CASE_TEMPLATE (ipv6_address_test_1, T, tag_types) {
131+ typedef uri::basic_uri<T> uri_type;
132+ typedef typename uri_type::string_type string_type;
133+
134+ const std::stringurl (" http://[1080:0:0:0:8:800:200C:417A]/" );
135+ const std::stringscheme (" http" );
136+ const std::stringhost (" [1080:0:0:0:8:800:200C:417A]" );
137+ const std::stringpath (" /" );
138+
139+ uri_typeinstance (string_type (boost::begin (url),boost::end (url)));
140+ BOOST_REQUIRE (uri::is_valid (instance));
141+ BOOST_CHECK (boost::equal (uri::scheme (instance), scheme));
142+ BOOST_CHECK (boost::equal (uri::host (instance), host));
143+ BOOST_CHECK (boost::equal (uri::path (instance), path));
144+ }
145+
146+ BOOST_AUTO_TEST_CASE_TEMPLATE (ipv6_address_test_2, T, tag_types) {
147+ typedef uri::basic_uri<T> uri_type;
148+ typedef typename uri_type::string_type string_type;
149+
150+ const std::stringurl (" http://[2001:db8:85a3:8d3:1319:8a2e:370:7348]/" );
151+ const std::stringscheme (" http" );
152+ const std::stringhost (" [2001:db8:85a3:8d3:1319:8a2e:370:7348]" );
153+ const std::stringpath (" /" );
154+
155+ uri_typeinstance (string_type (boost::begin (url),boost::end (url)));
156+ BOOST_REQUIRE (uri::is_valid (instance));
157+ BOOST_CHECK (boost::equal (uri::scheme (instance), scheme));
158+ BOOST_CHECK (boost::equal (uri::host (instance), host));
159+ BOOST_CHECK (boost::equal (uri::path (instance), path));
160+ }
153161
154162BOOST_AUTO_TEST_CASE_TEMPLATE (ftp_test, T, tag_types) {
155163typedef uri::basic_uri<T> uri_type;