Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfdfeeb8

Browse files
committed
Added test and applied fix for issue#67.
1 parentd4091d3 commitfdfeeb8

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

‎boost/network/uri/uri.hpp‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,9 @@ class uri
7272
return *this;
7373
}
7474

75-
uri &operator = (const string_type &uri_) {
76-
uri(uri_).swap(*this);
75+
uri &operator = (const string_type &uri) {
76+
uri_ = uri;
77+
parse();
7778
return *this;
7879
}
7980

‎libs/network/test/uri/url_test.cpp‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,3 +198,13 @@ BOOST_AUTO_TEST_CASE(range_test)
198198
BOOST_REQUIRE(uri::valid(instance));
199199
BOOST_CHECK(boost::equal(instance, url));
200200
}
201+
202+
BOOST_AUTO_TEST_CASE(issue_67_test)
203+
{
204+
const std::stringsite_name("http://www.google.com");
205+
uri::uri bar0;
206+
uri::uri bar1 = site_name;
207+
bar0 = site_name;
208+
BOOST_CHECK(uri::is_valid(bar0));
209+
BOOST_CHECK(uri::is_valid(bar1));
210+
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp